<html>
<head><meta charset="utf-8"><title>diagnostics · t-compiler/wg-nll · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/index.html">t-compiler/wg-nll</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html">diagnostics</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="126698402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126698402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126698402">(May 17 2018 at 13:55)</a>:</h4>
<p>Dear world, </p>
<p>So here's something I would like feedback on. I've got this 'almost PR' that aims to fix <a href="https://github.com/rust-lang-nursery/polonius/issues/24" target="_blank" title="https://github.com/rust-lang-nursery/polonius/issues/24">https://github.com/rust-lang-nursery/polonius/issues/24</a>. However, it seems to — for reasons I'm not <em>100%</em> sure about — regress diagnostics in some cases. I'd sort of like to land it anyway, and then revisit diagnostics, but I do think we need to start focusing on those and I'm not sure how best to do it.</p>



<a name="126705690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126705690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126705690">(May 17 2018 at 16:26)</a>:</h4>
<p>I think what would probably be useful is just manually wirting a bunch of diagnosis messages to get a feel for the interface we want to present</p>



<a name="126705699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126705699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126705699">(May 17 2018 at 16:27)</a>:</h4>
<p>and then working backwards to the code from there</p>



<a name="126705715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126705715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126705715">(May 17 2018 at 16:27)</a>:</h4>
<p>AST borrow-check errors is probably a good place to start, breaking everyone's ability to read error messages would probably not be a good idea</p>



<a name="126705776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126705776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126705776">(May 17 2018 at 16:28)</a>:</h4>
<p>As a personal anecdote, I really pretty heavily on the precise wording of error messages; especially when starting out</p>



<a name="126705854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126705854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126705854">(May 17 2018 at 16:30)</a>:</h4>
<p>I still mostly solve compilation problems with unfamiliar  Haskell code that way since I still haven't learned all the jargon to understand the error messages on a deeper level, and I imagine a number of people are in a similar position with Rust</p>



<a name="126706142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126706142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126706142">(May 17 2018 at 16:39)</a>:</h4>
<p>I'm torn. On the one hand, I think our current AST-based messages use way too much jargon, and can be simplified. On the other, I'd like to do things step by step.</p>



<a name="126706146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126706146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126706146">(May 17 2018 at 16:39)</a>:</h4>
<p>but the phasing is only part of it, it's more about "how shall we get the info and spans we need"</p>



<a name="126721781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126721781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126721781">(May 17 2018 at 22:38)</a>:</h4>
<p>as for diagnostics messages, what happened with the big spreadsheet Ariel have built?</p>



<a name="126721821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126721821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126721821">(May 17 2018 at 22:38)</a>:</h4>
<p>seemed like a good way to start</p>



<a name="126725950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126725950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126725950">(May 18 2018 at 00:51)</a>:</h4>
<p>well we have one better now, the <code>.nll</code> reference files</p>



<a name="126725951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126725951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126725951">(May 18 2018 at 00:51)</a>:</h4>
<p>anyway, i've had a few thoughts but I'll write them up tomorrow</p>



<a name="126870726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126870726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126870726">(May 21 2018 at 12:49)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> we had also talked about doing a kind of diagnostic triage this morning, right?</p>



<a name="126870758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126870758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126870758">(May 21 2018 at 12:49)</a>:</h4>
<p>yes, later today</p>



<a name="126875208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126875208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126875208">(May 21 2018 at 14:45)</a>:</h4>
<div class="codehilite"><pre><span></span>error: free region `` does not outlive free region `&#39;a`
</pre></div>


<p>is not great :-)</p>



<a name="126875440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126875440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126875440">(May 21 2018 at 14:50)</a>:</h4>
<p>you don't say :)</p>



<a name="126875454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126875454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126875454">(May 21 2018 at 14:51)</a>:</h4>
<p>see also <a href="https://github.com/rust-lang/rust/issues/49397" target="_blank" title="https://github.com/rust-lang/rust/issues/49397">https://github.com/rust-lang/rust/issues/49397</a></p>



<a name="126886484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886484">(May 21 2018 at 19:00)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="116009">@nikomatsakis</span> I'm ready whenever you are. (I'll start looking over the list in the meantime, take notes here as I notice things.)</p>



<a name="126886490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886490">(May 21 2018 at 19:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> ok</p>



<a name="126886494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886494">(May 21 2018 at 19:00)</a>:</h4>
<p>how should we start?</p>



<a name="126886496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886496">(May 21 2018 at 19:00)</a>:</h4>
<p>is there some central list ?</p>



<a name="126886502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886502">(May 21 2018 at 19:00)</a>:</h4>
<p>THe idea is to review the .nll.stderr cases , right?</p>



<a name="126886531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886531">(May 21 2018 at 19:01)</a>:</h4>
<p>I guess I could start by transcribing the existing <code>ls</code> output to a canonical list or table</p>



<a name="126886533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886533">(May 21 2018 at 19:01)</a>:</h4>
<p>right</p>



<a name="126886544"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886544" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886544">(May 21 2018 at 19:01)</a>:</h4>
<p>I was just wondering in what order we wanted to go, I guess?</p>



<a name="126886548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886548">(May 21 2018 at 19:01)</a>:</h4>
<p>i'm bringing things back into cache here</p>



<a name="126886558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886558">(May 21 2018 at 19:01)</a>:</h4>
<p>I think our goal was to kind of "develop a triage system"?</p>



<a name="126886574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886574">(May 21 2018 at 19:02)</a>:</h4>
<p>right, we were going to (if necessary?) sample a few?</p>



<a name="126886605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886605">(May 21 2018 at 19:02)</a>:</h4>
<p>to maybe provide guidance?</p>



<a name="126886611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886611">(May 21 2018 at 19:02)</a>:</h4>
<p>I will note that one subcategory that we may have overlooked</p>



<a name="126886629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886629">(May 21 2018 at 19:02)</a>:</h4>
<p>are cases where we are producing many errors. One situation is with outright repetition, from the user's POV</p>



<a name="126886664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886664">(May 21 2018 at 19:03)</a>:</h4>
<p>another is many related errors where only one is really pointing to the key error. (Though I'm guessing in general such identification will be subjective.)</p>



<a name="126886672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886672">(May 21 2018 at 19:03)</a>:</h4>
<p>I guess let's just go through <code>find . -name '*nll.stderr'</code> in alphabetical order?</p>



<a name="126886727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886727">(May 21 2018 at 19:04)</a>:</h4>
<p>sorted by full path?</p>



<a name="126886729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886729">(May 21 2018 at 19:04)</a>:</h4>
<p>that was unclear</p>



<a name="126886734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886734">(May 21 2018 at 19:04)</a>:</h4>
<p>idk, somebody make a list :p</p>



<a name="126886736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886736">(May 21 2018 at 19:04)</a>:</h4>
<p>right was about to do that</p>



<a name="126886765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886765">(May 21 2018 at 19:05)</a>:</h4>
<p>ok lemme know when it exists :)</p>



<a name="126886957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886957">(May 21 2018 at 19:09)</a>:</h4>
<p>here is a list: <a href="https://gist.github.com/pnkfelix/9f145908d70655a702787d9cadf78977" target="_blank" title="https://gist.github.com/pnkfelix/9f145908d70655a702787d9cadf78977">https://gist.github.com/pnkfelix/9f145908d70655a702787d9cadf78977</a></p>



<a name="126886971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126886971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126886971">(May 21 2018 at 19:10)</a>:</h4>
<p>can you edit my gists, or do I need to put this elsewhere?</p>



<a name="126887037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887037">(May 21 2018 at 19:10)</a>:</h4>
<p>I don't think I can edit a gist of yours</p>



<a name="126887040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887040">(May 21 2018 at 19:10)</a>:</h4>
<p>but I guess you can be the master</p>



<a name="126887057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887057">(May 21 2018 at 19:11)</a>:</h4>
<p>so we start with first thing?</p>



<a name="126887060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887060">(May 21 2018 at 19:11)</a>:</h4>
<p>I guess so</p>



<a name="126887131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887131">(May 21 2018 at 19:12)</a>:</h4>
<p>it seems essentially the same</p>



<a name="126887142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887142">(May 21 2018 at 19:12)</a>:</h4>
<p>why does that output differ in that  superficial way?</p>



<a name="126887157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887157">(May 21 2018 at 19:13)</a>:</h4>
<p>sorry, I'm having some git trouble :)</p>



<a name="126887160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887160">(May 21 2018 at 19:13)</a>:</h4>
<p>still haven't seen the new output</p>



<a name="126887162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887162">(May 21 2018 at 19:13)</a>:</h4>
<p>yeah give me a sec</p>



<a name="126887166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887166">(May 21 2018 at 19:13)</a>:</h4>
<p>I'll show you links</p>



<a name="126887171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887171">(May 21 2018 at 19:13)</a>:</h4>
<p>its possible I'm misinterpreting the filenames</p>



<a name="126887182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887182">(May 21 2018 at 19:13)</a>:</h4>
<p>since I myself am unfamiliar with how revisions and compiletest modes got mixed.</p>



<a name="126887183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887183">(May 21 2018 at 19:13)</a>:</h4>
<p>ok I'm back now</p>



<a name="126887235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887235">(May 21 2018 at 19:14)</a>:</h4>
<p>so I'm comparing, old: <a href="https://github.com/rust-lang/rust/blob/master/src/test/ui/E0508.ast.stderr" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/test/ui/E0508.ast.stderr">https://github.com/rust-lang/rust/blob/master/src/test/ui/E0508.ast.stderr</a></p>



<a name="126887237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887237">(May 21 2018 at 19:14)</a>:</h4>
<p>seems like it's a missing suggestiojn</p>



<a name="126887238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887238">(May 21 2018 at 19:14)</a>:</h4>
<p>new: <a href="https://github.com/rust-lang/rust/blob/master/src/test/ui/E0508.ast.nll.stderr" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/test/ui/E0508.ast.nll.stderr">https://github.com/rust-lang/rust/blob/master/src/test/ui/E0508.ast.nll.stderr</a></p>



<a name="126887254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887254">(May 21 2018 at 19:14)</a>:</h4>
<p>I would rate this as "meh"</p>



<a name="126887255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887255">(May 21 2018 at 19:14)</a>:</h4>
<p>so if there's no suggestion, the diagnostic system collapses the error onto the same line as the "^^^^^^" ?</p>



<a name="126887256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887256">(May 21 2018 at 19:14)</a>:</h4>
<p>yes</p>



<a name="126887258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887258">(May 21 2018 at 19:14)</a>:</h4>
<p>if there is just one label at a given spot</p>



<a name="126887261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887261">(May 21 2018 at 19:14)</a>:</h4>
<p>okay</p>



<a name="126887267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887267">(May 21 2018 at 19:15)</a>:</h4>
<p>if there are more labels, it falls back to other layouts</p>



<a name="126887287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887287">(May 21 2018 at 19:15)</a>:</h4>
<p>here wait</p>



<a name="126887293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887293">(May 21 2018 at 19:15)</a>:</h4>
<p>I'll move the gist to a Paper doc</p>



<a name="126887296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887296">(May 21 2018 at 19:15)</a>:</h4>
<p>+1</p>



<a name="126887310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887310">(May 21 2018 at 19:15)</a>:</h4>
<p>(or ... does paper support the same table syntax? I guess I'll find out)</p>



<a name="126887365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887365">(May 21 2018 at 19:16)</a>:</h4>
<p>I..don't know about that</p>



<a name="126887369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887369">(May 21 2018 at 19:16)</a>:</h4>
<p>I doubt it</p>



<a name="126887374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887374">(May 21 2018 at 19:16)</a>:</h4>
<p>but maybe!</p>



<a name="126887415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887415">(May 21 2018 at 19:17)</a>:</h4>
<p>I'll just transcribe to a Paper table as we go</p>



<a name="126887484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887484">(May 21 2018 at 19:18)</a>:</h4>
<p>which paper doc?</p>



<a name="126887515"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887515" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887515">(May 21 2018 at 19:19)</a>:</h4>
<p>here it is: <a href="https://paper.dropbox.com/doc/Untitled-KzroSvNgQ7lip3WQyiLTa" target="_blank" title="https://paper.dropbox.com/doc/Untitled-KzroSvNgQ7lip3WQyiLTa">https://paper.dropbox.com/doc/Untitled-KzroSvNgQ7lip3WQyiLTa</a></p>



<a name="126887598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887598">(May 21 2018 at 19:21)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> ok <code>augmented-assignment</code> looks terrible :)</p>



<a name="126887611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887611">(May 21 2018 at 19:21)</a>:</h4>
<p>there seem to be a few things going on</p>



<a name="126887623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887623">(May 21 2018 at 19:21)</a>:</h4>
<p>well the old one doesn't look that good to me either</p>



<a name="126887628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887628">(May 21 2018 at 19:21)</a>:</h4>
<p>I think it looks fine</p>



<a name="126887670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887670">(May 21 2018 at 19:22)</a>:</h4>
<p>but it is somewhat mesed up because of the comments that are in there</p>



<a name="126887672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887672">(May 21 2018 at 19:22)</a>:</h4>
<p>e.g., the output I see:</p>



<a name="126887677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887677">(May 21 2018 at 19:22)</a>:</h4>
<div class="codehilite"><pre><span></span>error[E0596]: cannot borrow immutable local variable `y` as mutable
  --&gt; $DIR/augmented-assignments.rs:30:5
   |
LL |     let y = Int(2);
   |         - consider changing this to `mut y`
LL |     //~^ consider changing this to `mut y`
LL |     y   //~ error: cannot borrow immutable local variable `y` as mutable
   |     ^ cannot borrow mutably
</pre></div>



<a name="126887678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887678">(May 21 2018 at 19:22)</a>:</h4>
<p>yeah I guess that's the issue</p>



<a name="126887679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887679">(May 21 2018 at 19:22)</a>:</h4>
<p>but without the comments, would be:</p>



<a name="126887684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887684">(May 21 2018 at 19:22)</a>:</h4>
<div class="codehilite"><pre><span></span>error[E0596]: cannot borrow immutable local variable `y` as mutable
  --&gt; $DIR/augmented-assignments.rs:30:5
   |
LL |     let y = Int(2);
   |         - consider changing this to `mut y`
LL |
LL |     y
   |     ^ cannot borrow mutably
</pre></div>



<a name="126887689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887689">(May 21 2018 at 19:22)</a>:</h4>
<p>that seems relatively clean</p>



<a name="126887696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887696">(May 21 2018 at 19:22)</a>:</h4>
<p>(I still like our embedded expected-errors-in-comments system but we probably need to move the outside of the spans that rustc reports)</p>



<a name="126887700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887700">(May 21 2018 at 19:23)</a>:</h4>
<p>(I'm not crazy about the wild jargon we add, like "immutable local variable <code>y</code>", but...)</p>



<a name="126887712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887712">(May 21 2018 at 19:23)</a>:</h4>
<p>anyway so in that first example, we are no longer issuing a suggestion:</p>



<a name="126887713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887713">(May 21 2018 at 19:23)</a>:</h4>
<p>I was thinking,</p>



<a name="126887715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887715">(May 21 2018 at 19:23)</a>:</h4>
<p>we should probably be categorizing the suggestions?</p>



<a name="126887717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887717">(May 21 2018 at 19:23)</a>:</h4>
<p>many of them already have issues afaik</p>



<a name="126887725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887725">(May 21 2018 at 19:23)</a>:</h4>
<p>not sure whether that's worth the trouble</p>



<a name="126887732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887732">(May 21 2018 at 19:23)</a>:</h4>
<p>I guess we could categorize the text of the missing suggestion</p>



<a name="126887778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887778">(May 21 2018 at 19:24)</a>:</h4>
<p>well, if one can find the relevant link easily, no harm in linking to the issue from the paper doc then</p>



<a name="126887875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887875">(May 21 2018 at 19:26)</a>:</h4>
<p>I'm at least adding the text of the suggestion</p>



<a name="126887877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887877">(May 21 2018 at 19:26)</a>:</h4>
<p>I put some notes on augmented-assignment</p>



<a name="126887879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887879">(May 21 2018 at 19:27)</a>:</h4>
<p>thanks</p>



<a name="126887895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887895">(May 21 2018 at 19:27)</a>:</h4>
<p>I agree, I think the fact that there was no <code>+=</code> in the output from the old error is probably in part what made me think it was not so good</p>



<a name="126887905"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887905" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887905">(May 21 2018 at 19:27)</a>:</h4>
<p>yeah, that fn is less good than the other</p>



<a name="126887969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887969">(May 21 2018 at 19:29)</a>:</h4>
<p>so <code>borrowck/borrowck-box-insensitivity.stderr</code></p>



<a name="126887976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887976">(May 21 2018 at 19:29)</a>:</h4>
<p>I think that what is happening here is that NLL lets us "see through" <code>Box</code> again</p>



<a name="126887977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887977">(May 21 2018 at 19:29)</a>:</h4>
<p>hence going from 16 errors to 2</p>



<a name="126887984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887984">(May 21 2018 at 19:29)</a>:</h4>
<p>those two errors seem fine</p>



<a name="126887989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126887989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126887989">(May 21 2018 at 19:29)</a>:</h4>
<p>yeah, I think we decided that was now part of the plan of record, right?</p>



<a name="126888028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888028">(May 21 2018 at 19:30)</a>:</h4>
<p>(being able to "see through" Box)</p>



<a name="126888053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888053">(May 21 2018 at 19:30)</a>:</h4>
<p>yeah, @arielb1 and I said that</p>



<a name="126888055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888055">(May 21 2018 at 19:30)</a>:</h4>
<p>I think..it's fine</p>



<a name="126888058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888058">(May 21 2018 at 19:30)</a>:</h4>
<p>it was kind of a pain to reproduce the old behavior</p>



<a name="126888062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888062">(May 21 2018 at 19:30)</a>:</h4>
<p>and...for what?</p>



<a name="126888068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888068">(May 21 2018 at 19:30)</a>:</h4>
<p>ultimately we'd like other types to be able to behave like <code>Box</code>, but...</p>



<a name="126888080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888080">(May 21 2018 at 19:31)</a>:</h4>
<p>(particularly since the old logic was incomplete anyway)</p>



<a name="126888082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888082">(May 21 2018 at 19:31)</a>:</h4>
<p>If I happen to see the record of that conversation, I'll link it there. Lets move along.</p>



<a name="126888090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888090">(May 21 2018 at 19:31)</a>:</h4>
<p>borrowck/borrowck-escaping-closure-error-1.nll.stderr</p>



<a name="126888096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888096">(May 21 2018 at 19:31)</a>:</h4>
<p>we've lost the special handling of closures here</p>



<a name="126888145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888145">(May 21 2018 at 19:32)</a>:</h4>
<p>yeah</p>



<a name="126888150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888150">(May 21 2018 at 19:32)</a>:</h4>
<p>this .. hmm. This is a tricky one. =)</p>



<a name="126888155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888155">(May 21 2018 at 19:32)</a>:</h4>
<p>I  mean the old error was clearly smarter</p>



<a name="126888161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888161">(May 21 2018 at 19:32)</a>:</h4>
<p>right, but do we want to attempt to re-embed such intelligence</p>



<a name="126888168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888168">(May 21 2018 at 19:32)</a>:</h4>
<p>and yet I'm not sure if I'd call it a <strong>blocker</strong></p>



<a name="126888175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888175">(May 21 2018 at 19:32)</a>:</h4>
<p>it's kind of in between</p>



<a name="126888181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888181">(May 21 2018 at 19:32)</a>:</h4>
<p>its not quite "meh"</p>



<a name="126888189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888189">(May 21 2018 at 19:33)</a>:</h4>
<p>maybe we want a middle category</p>



<a name="126888196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888196">(May 21 2018 at 19:33)</a>:</h4>
<p>maybe "acceptable losses"</p>



<a name="126888217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888217">(May 21 2018 at 19:33)</a>:</h4>
<p>Like, we know its something that would be to fix, but we have to prioritize...</p>



<a name="126888220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888220">(May 21 2018 at 19:33)</a>:</h4>
<p>right. kind of long tho</p>



<a name="126888254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888254">(May 21 2018 at 19:34)</a>:</h4>
<p>doesn't the military have a succinct phrase for this?</p>



<a name="126888271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888271">(May 21 2018 at 19:34)</a>:</h4>
<p>probably :)</p>



<a name="126888272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888272">(May 21 2018 at 19:34)</a>:</h4>
<p>collateral</p>



<a name="126888273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888273">(May 21 2018 at 19:34)</a>:</h4>
<p>damage</p>



<a name="126888275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888275">(May 21 2018 at 19:34)</a>:</h4>
<p>?</p>



<a name="126888280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888280">(May 21 2018 at 19:34)</a>:</h4>
<p>maybe <span class="emoji emoji-1f915" title="face with head bandage">:face_with_head_bandage:</span></p>



<a name="126888282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888282">(May 21 2018 at 19:34)</a>:</h4>
<p>heh =)</p>



<a name="126888284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888284">(May 21 2018 at 19:34)</a>:</h4>
<p>("collateral" on  its own dosn't make sense)</p>



<a name="126888286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888286">(May 21 2018 at 19:34)</a>:</h4>
<p>heh</p>



<a name="126888291"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888291" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888291">(May 21 2018 at 19:34)</a>:</h4>
<p>:bandage:</p>



<a name="126888293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888293">(May 21 2018 at 19:34)</a>:</h4>
<p>hmm</p>



<a name="126888308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888308">(May 21 2018 at 19:35)</a>:</h4>
<p>"if necessary"</p>



<a name="126888311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888311">(May 21 2018 at 19:35)</a>:</h4>
<p>anyway, pick something :)</p>



<a name="126888318"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888318" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888318">(May 21 2018 at 19:35)</a>:</h4>
<p>doesn't have to be funny I guess ;)</p>



<a name="126888390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888390">(May 21 2018 at 19:36)</a>:</h4>
<p>next one, borrowck/borrowck-escaping-closure-error-2.nll.stderr,  seems to be another instance of the same</p>



<a name="126888394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888394">(May 21 2018 at 19:36)</a>:</h4>
<p>yeah</p>



<a name="126888410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888410">(May 21 2018 at 19:37)</a>:</h4>
<p>I think the next one is a case of "meh" to me</p>



<a name="126888413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888413">(May 21 2018 at 19:37)</a>:</h4>
<p>well</p>



<a name="126888414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888414">(May 21 2018 at 19:37)</a>:</h4>
<p>they're both not that great</p>



<a name="126888419"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888419" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888419">(May 21 2018 at 19:37)</a>:</h4>
<p>but I guess that in this case, the old message is giving useful info</p>



<a name="126888422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888422">(May 21 2018 at 19:37)</a>:</h4>
<p>in a jargon-y way</p>



<a name="126888480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888480">(May 21 2018 at 19:38)</a>:</h4>
<p>I guess this is "if needed"? (I'm wondering if it's going to be easy to tell the difference between that and "meh", but we can always collapse them later)</p>



<a name="126888482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888482">(May 21 2018 at 19:38)</a>:</h4>
<p>yeah there's somewhat more specific info there that might help someone over a hurdle.</p>



<a name="126888483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888483">(May 21 2018 at 19:38)</a>:</h4>
<p>I'd say "if needed" for it</p>



<a name="126888484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888484">(May 21 2018 at 19:38)</a>:</h4>
<p>right</p>



<a name="126888488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888488">(May 21 2018 at 19:38)</a>:</h4>
<p>part of our problem</p>



<a name="126888489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888489">(May 21 2018 at 19:38)</a>:</h4>
<p>is that our first instance of "meh"</p>



<a name="126888491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888491">(May 21 2018 at 19:38)</a>:</h4>
<p>really was <em>so</em> ignorable</p>



<a name="126888499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888499">(May 21 2018 at 19:38)</a>:</h4>
<p>it may have a set a more  extreme bar than we want for "meh" in general.</p>



<a name="126888504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888504">(May 21 2018 at 19:39)</a>:</h4>
<p>:)</p>



<a name="126888505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888505">(May 21 2018 at 19:39)</a>:</h4>
<p>there's a lot going on in this one</p>



<a name="126888561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888561">(May 21 2018 at 19:40)</a>:</h4>
<p>seems like three things:</p>
<p>1. match statements giving us a lot of duplicates<br>
2. no suggestions about <code>ref</code><br>
3. useful specificity is gone ("which implements the <code>Drop</code> trait")</p>



<a name="126888596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888596">(May 21 2018 at 19:41)</a>:</h4>
<p>even so</p>



<a name="126888600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888600">(May 21 2018 at 19:41)</a>:</h4>
<p>I'm not feeling it to be a MY EYES case</p>



<a name="126888644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888644">(May 21 2018 at 19:42)</a>:</h4>
<p>except for the duplication perhaps...</p>



<a name="126888652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888652">(May 21 2018 at 19:42)</a>:</h4>
<p>I guess the <code>ref</code> suggestions could go a long way</p>



<a name="126888655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888655">(May 21 2018 at 19:42)</a>:</h4>
<p>or rather, if we have regressed to point where we never suggest <code>ref</code></p>



<a name="126888660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888660">(May 21 2018 at 19:42)</a>:</h4>
<p>then that probably <em>does</em> need to be fixed.</p>



<a name="126888678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888678">(May 21 2018 at 19:43)</a>:</h4>
<p>I'm not really sure</p>



<a name="126888680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888680">(May 21 2018 at 19:43)</a>:</h4>
<p>I think the duplication is more severe</p>



<a name="126888689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888689">(May 21 2018 at 19:43)</a>:</h4>
<p>I think I'd call it "if needed" overall</p>



<a name="126888692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888692">(May 21 2018 at 19:44)</a>:</h4>
<p>to be clear</p>



<a name="126888694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888694">(May 21 2018 at 19:44)</a>:</h4>
<p>the duplication here</p>



<a name="126888727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888727">(May 21 2018 at 19:44)</a>:</h4>
<p>...</p>



<a name="126888738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888738">(May 21 2018 at 19:44)</a>:</h4>
<p>the duplication seems to be O(num_arms)</p>



<a name="126888740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888740">(May 21 2018 at 19:44)</a>:</h4>
<p>it could be pretty intense</p>



<a name="126888742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888742">(May 21 2018 at 19:44)</a>:</h4>
<p>on a big program</p>



<a name="126888748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888748">(May 21 2018 at 19:44)</a>:</h4>
<p>so that might be a MY EYES problem</p>



<a name="126888749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888749">(May 21 2018 at 19:44)</a>:</h4>
<p>ah okay</p>



<a name="126888754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888754">(May 21 2018 at 19:44)</a>:</h4>
<p>you're not talking about the failure to collapse in the first arm</p>



<a name="126888756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888756">(May 21 2018 at 19:44)</a>:</h4>
<p>the <code>num1</code> and <code>num2</code></p>



<a name="126888763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888763">(May 21 2018 at 19:44)</a>:</h4>
<p>we're also highlighting a weird span</p>



<a name="126888765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888765">(May 21 2018 at 19:45)</a>:</h4>
<p>it's natural to <em>me</em></p>



<a name="126888774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888774">(May 21 2018 at 19:45)</a>:</h4>
<p>but blaming a binding in the match arm</p>



<a name="126888776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888776">(May 21 2018 at 19:45)</a>:</h4>
<p>instead of the path being matched</p>



<a name="126888778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888778">(May 21 2018 at 19:45)</a>:</h4>
<p>but is this actually showing (more) duplication?</p>



<a name="126888779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888779">(May 21 2018 at 19:45)</a>:</h4>
<p>might be quite confusing to people</p>



<a name="126888785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888785">(May 21 2018 at 19:45)</a>:</h4>
<p>sorry I'm just going through the old error</p>



<a name="126888789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888789">(May 21 2018 at 19:45)</a>:</h4>
<p>new error:</p>



<a name="126888793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888793">(May 21 2018 at 19:45)</a>:</h4>
<div class="codehilite"><pre><span></span>error[E0507]: cannot move out of borrowed content
  --&gt; $DIR/borrowck-move-error-with-note.rs:23:19
   |
LL |         Foo::Foo1(num1,
   |                   ^^^^ cannot move out of borrowed content

error[E0507]: cannot move out of borrowed content
  --&gt; $DIR/borrowck-move-error-with-note.rs:24:19
   |
LL |                   num2) =&gt; (),
   |                   ^^^^ cannot move out of borrowed content

error[E0507]: cannot move out of borrowed content
  --&gt; $DIR/borrowck-move-error-with-note.rs:25:19
   |
LL |         Foo::Foo2(num) =&gt; (),
   |                   ^^^ cannot move out of borrowed content
</pre></div>



<a name="126888795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888795">(May 21 2018 at 19:45)</a>:</h4>
<p>it's actually O(num_bindings)</p>



<a name="126888798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888798">(May 21 2018 at 19:45)</a>:</h4>
<p>which is &gt; arms</p>



<a name="126888802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888802">(May 21 2018 at 19:46)</a>:</h4>
<p>oh you <em>are</em> talking about the failure to collapse then?</p>



<a name="126888840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888840">(May 21 2018 at 19:46)</a>:</h4>
<p>the old error did report each binding</p>



<a name="126888846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888846">(May 21 2018 at 19:46)</a>:</h4>
<p>just more concisely</p>



<a name="126888850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888850">(May 21 2018 at 19:46)</a>:</h4>
<p>yes, just one "master error"</p>



<a name="126888856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888856">(May 21 2018 at 19:46)</a>:</h4>
<p>I think that's why I'm more willing to accept it as not as high a priority</p>



<a name="126888858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888858">(May 21 2018 at 19:46)</a>:</h4>
<p>I guess I could go with "if needed" here</p>



<a name="126888862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888862">(May 21 2018 at 19:46)</a>:</h4>
<p>but maybe that's in part because I'm assuming it will be readily fixed...</p>



<a name="126888871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888871">(May 21 2018 at 19:47)</a>:</h4>
<p>in some sense the current output is better than if it were:</p>
<div class="codehilite"><pre><span></span>error[E0507]: cannot move out of borrowed content
  --&gt; $DIR/borrowck-move-error-with-note.rs:21:11
   |
LL |     match *f {             //~ ERROR cannot move out of
   |           ^^ cannot move out of borrowed content
</pre></div>


<p>without the rest</p>



<a name="126888874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888874">(May 21 2018 at 19:47)</a>:</h4>
<p>maybe we will need to categorize the distinct subproblems we've identified</p>



<a name="126888875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888875">(May 21 2018 at 19:47)</a>:</h4>
<p>because often it is very confusing to find the arm</p>



<a name="126888881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888881">(May 21 2018 at 19:47)</a>:</h4>
<p>that said, note that as <code>ref</code> bindings get deprecated in favor of match-ref-bindings this will be nicer :)</p>



<a name="126888886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888886">(May 21 2018 at 19:47)</a>:</h4>
<p>did you see the notes I put in the paper?</p>



<a name="126888888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888888">(May 21 2018 at 19:47)</a>:</h4>
<p>that is, I did try to break down</p>



<a name="126888889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888889">(May 21 2018 at 19:47)</a>:</h4>
<p>Hmm</p>



<a name="126888895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888895">(May 21 2018 at 19:47)</a>:</h4>
<p>the old errors show the match input</p>



<a name="126888897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888897">(May 21 2018 at 19:48)</a>:</h4>
<p>as well as the arm</p>



<a name="126888944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888944">(May 21 2018 at 19:48)</a>:</h4>
<p>yeah</p>



<a name="126888946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888946">(May 21 2018 at 19:48)</a>:</h4>
<p>anyway I can get behind "if needed" here</p>



<a name="126888951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888951">(May 21 2018 at 19:48)</a>:</h4>
<p>The new errors don't include the match input at all</p>



<a name="126888953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888953">(May 21 2018 at 19:48)</a>:</h4>
<p>though I think .. this is a fairly common thing</p>



<a name="126888960"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888960" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888960">(May 21 2018 at 19:48)</a>:</h4>
<p>so I lean towards MY EYES</p>



<a name="126888961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888961">(May 21 2018 at 19:49)</a>:</h4>
<p>oh you did say this as part of your <strong>span</strong> note</p>



<a name="126888962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888962">(May 21 2018 at 19:49)</a>:</h4>
<p>also we should move quickly :)</p>



<a name="126888963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888963">(May 21 2018 at 19:49)</a>:</h4>
<p>okay</p>



<a name="126888964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126888964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126888964">(May 21 2018 at 19:49)</a>:</h4>
<p>I did</p>



<a name="126889040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889040">(May 21 2018 at 19:50)</a>:</h4>
<p>hmm</p>



<a name="126889048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889048">(May 21 2018 at 19:50)</a>:</h4>
<p>I sorta preer the NLL output here :)</p>



<a name="126889051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889051">(May 21 2018 at 19:50)</a>:</h4>
<p>neither is great</p>



<a name="126889066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889066">(May 21 2018 at 19:50)</a>:</h4>
<p>the NLL output does not include the type being moved out of</p>



<a name="126889067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889067">(May 21 2018 at 19:50)</a>:</h4>
<p>but NLL is better, I think</p>



<a name="126889069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889069">(May 21 2018 at 19:50)</a>:</h4>
<p>which can be convenient</p>



<a name="126889077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889077">(May 21 2018 at 19:51)</a>:</h4>
<p>but over all</p>



<a name="126889078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889078">(May 21 2018 at 19:51)</a>:</h4>
<p>true</p>



<a name="126889086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889086">(May 21 2018 at 19:51)</a>:</h4>
<p>the biggest problem w/ original is the span...</p>



<a name="126889089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889089">(May 21 2018 at 19:51)</a>:</h4>
<p>I also like the NLL output.</p>



<a name="126889096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889096">(May 21 2018 at 19:51)</a>:</h4>
<p>it should really be highlighting the thing being matched probably</p>



<a name="126889098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889098">(May 21 2018 at 19:51)</a>:</h4>
<p>like the prior example</p>



<a name="126889104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889104">(May 21 2018 at 19:51)</a>:</h4>
<p>(sort of ironic that it isn't)</p>



<a name="126889105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889105">(May 21 2018 at 19:51)</a>:</h4>
<p>yeah. Which it is odd the old error wasn't doing that</p>



<a name="126889111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889111">(May 21 2018 at 19:51)</a>:</h4>
<p><span class="emoji emoji-1f937" title="shrug">:shrug:</span></p>



<a name="126889114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889114">(May 21 2018 at 19:51)</a>:</h4>
<p>not sure why not</p>



<a name="126889115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889115">(May 21 2018 at 19:51)</a>:</h4>
<p>anyway</p>



<a name="126889117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889117">(May 21 2018 at 19:51)</a>:</h4>
<p>i say "meh"</p>



<a name="126889119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889119">(May 21 2018 at 19:51)</a>:</h4>
<p>yeah</p>



<a name="126889185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889185">(May 21 2018 at 19:53)</a>:</h4>
<p>seems like next case is <span class="emoji emoji-1f4af" title="100">:100:</span> — NLL gets no error</p>



<a name="126889191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889191">(May 21 2018 at 19:53)</a>:</h4>
<p>hopefully correctly:)</p>



<a name="126889198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889198">(May 21 2018 at 19:53)</a>:</h4>
<p>I can't even tell what the original was trying to test</p>



<a name="126889255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889255">(May 21 2018 at 19:54)</a>:</h4>
<p>(do we want to record tests that we ought to update for NLL?)</p>



<a name="126889260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889260">(May 21 2018 at 19:54)</a>:</h4>
<p>okay next up</p>



<a name="126889264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889264">(May 21 2018 at 19:54)</a>:</h4>
<p>oh sorry</p>



<a name="126889269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889269">(May 21 2018 at 19:54)</a>:</h4>
<p>didn't keep up with you (lost my browser windows with the tests)</p>



<a name="126889277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889277">(May 21 2018 at 19:54)</a>:</h4>
<p>we need to have a category for that, at lesast in terms of whether to <em>try</em> to reproduce the original</p>



<a name="126889290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889290">(May 21 2018 at 19:55)</a>:</h4>
<p>right</p>



<a name="126889291"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889291" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889291">(May 21 2018 at 19:55)</a>:</h4>
<p>for some, the error will be <strong>inherently</strong> about testing lexical lifetimes</p>



<a name="126889294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889294">(May 21 2018 at 19:55)</a>:</h4>
<p>this particular test seems kind of .. like it must be covered elsewhere</p>



<a name="126889295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889295">(May 21 2018 at 19:55)</a>:</h4>
<p>but yeah</p>



<a name="126889298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889298">(May 21 2018 at 19:55)</a>:</h4>
<p>"weak test"</p>



<a name="126889301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889301">(May 21 2018 at 19:55)</a>:</h4>
<p>I added an <strong>update</strong> category</p>



<a name="126889343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889343">(May 21 2018 at 19:56)</a>:</h4>
<p>Hmm you really want to mark this as "100" ?</p>



<a name="126889348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889348">(May 21 2018 at 19:56)</a>:</h4>
<p>I guess your point is that it does not block NLL</p>



<a name="126889353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889353">(May 21 2018 at 19:56)</a>:</h4>
<p>but</p>



<a name="126889355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889355">(May 21 2018 at 19:56)</a>:</h4>
<p>it probably should ?</p>



<a name="126889365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889365">(May 21 2018 at 19:56)</a>:</h4>
<p>otherwise turning NLL on my default will then lead to risk of future regression  not being caught</p>



<a name="126889374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889374">(May 21 2018 at 19:57)</a>:</h4>
<p>ah</p>



<a name="126889380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889380">(May 21 2018 at 19:57)</a>:</h4>
<p>ok, we can add some new category</p>



<a name="126889393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889393">(May 21 2018 at 19:57)</a>:</h4>
<p>I suggested "weak test" before</p>



<a name="126889455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889455">(May 21 2018 at 19:58)</a>:</h4>
<p>ah ok</p>



<a name="126889456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889456">(May 21 2018 at 19:58)</a>:</h4>
<p>sounds good</p>



<a name="126889459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889459">(May 21 2018 at 19:58)</a>:</h4>
<p>I wrote "update" but "weak test" is fine</p>



<a name="126889472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889472">(May 21 2018 at 19:59)</a>:</h4>
<p>Update is fine, lets just make use of our last minute</p>



<a name="126889476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889476">(May 21 2018 at 19:59)</a>:</h4>
<p>oy that's a MY EYES</p>



<a name="126889535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889535">(May 21 2018 at 20:00)</a>:</h4>
<p>ah yeah definitely</p>



<a name="126889537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889537">(May 21 2018 at 20:00)</a>:</h4>
<p>though it actually ... might be close</p>



<a name="126889542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889542">(May 21 2018 at 20:00)</a>:</h4>
<p>if you squint just right. :)</p>



<a name="126889552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889552">(May 21 2018 at 20:00)</a>:</h4>
<p>the old one is .. light years better  =)</p>



<a name="126889554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889554">(May 21 2018 at 20:00)</a>:</h4>
<p>hard to know where to even begin</p>



<a name="126889559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889559">(May 21 2018 at 20:00)</a>:</h4>
<p>I guess it's a specificity fail</p>



<a name="126889568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889568">(May 21 2018 at 20:01)</a>:</h4>
<p>i do find it funny that NLL does point out that <code>let x</code> is not <code>let mut x</code></p>



<a name="126889578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889578">(May 21 2018 at 20:01)</a>:</h4>
<p>while the old diagnostic is focusing on the most fundamental issue to be addressed</p>



<a name="126889581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889581">(May 21 2018 at 20:01)</a>:</h4>
<p>hey, yes</p>



<a name="126889584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889584">(May 21 2018 at 20:01)</a>:</h4>
<p>I think that error is coming from regionck</p>



<a name="126889624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889624">(May 21 2018 at 20:02)</a>:</h4>
<p>so borrowck has not yet run</p>



<a name="126889635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889635">(May 21 2018 at 20:02)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> I gotta another meeting now</p>



<a name="126889636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889636">(May 21 2018 at 20:02)</a>:</h4>
<p>but this was a good start</p>



<a name="126889642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889642">(May 21 2018 at 20:02)</a>:</h4>
<p>yeahs lets stop here</p>



<a name="126889650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889650">(May 21 2018 at 20:02)</a>:</h4>
<p><span class="emoji emoji-1f44d" title="+1">:+1:</span></p>



<a name="126889669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126889669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126889669">(May 21 2018 at 20:03)</a>:</h4>
<p>I'll try to at least guessetimate how long the remaing categorization would take us, vs the time it would take if we tried to farm it out</p>



<a name="126974169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126974169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126974169">(May 23 2018 at 12:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> so I was thinking of looking over the list and starting already to mentor people through some of the existing problems. For example, I thought maybe <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> might have interest in tackling the augmented-assignment problem (though I've not looked deeply at it)</p>



<a name="126974223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126974223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126974223">(May 23 2018 at 12:26)</a>:</h4>
<p>sure</p>



<a name="126974226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126974226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126974226">(May 23 2018 at 12:26)</a>:</h4>
<p>I added a column where we can add links to actual filed issues</p>



<a name="126974229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126974229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126974229">(May 23 2018 at 12:26)</a>:</h4>
<p>but I haven't filed any issues yet</p>



<a name="126974236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126974236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126974236">(May 23 2018 at 12:27)</a>:</h4>
<p>(I've just put in single letters to try to correlate the rows that should have the same issue)</p>



<a name="126974562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126974562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126974562">(May 23 2018 at 12:37)</a>:</h4>
<p>ok</p>



<a name="126979697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126979697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126979697">(May 23 2018 at 14:51)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="116083">@pnkfelix</span> wherever you need help :)</p>



<a name="126979772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126979772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126979772">(May 23 2018 at 14:52)</a>:</h4>
<p>I'm <em>almost</em> done going through the list</p>



<a name="126979782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126979782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126979782">(May 23 2018 at 14:53)</a>:</h4>
<p>have like 19 uncategorized rows left</p>



<a name="126979801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126979801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126979801">(May 23 2018 at 14:53)</a>:</h4>
<p>(I'll need to leave in perhaps 15 min or so... so we'll see ...)</p>



<a name="126981188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126981188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126981188">(May 23 2018 at 15:21)</a>:</h4>
<p>Okay, finished going through the whole list!</p>



<a name="126981190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126981190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126981190">(May 23 2018 at 15:21)</a>:</h4>
<p><a href="https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa" target="_blank" title="https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa">https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa</a></p>



<a name="126981201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126981201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126981201">(May 23 2018 at 15:21)</a>:</h4>
<p>I stopped trying to correlate the rows as I went</p>



<a name="126981210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126981210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126981210">(May 23 2018 at 15:21)</a>:</h4>
<p>(in part because it was leading me to revise earlier rows as I identified commonalities)</p>



<a name="126981258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126981258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126981258">(May 23 2018 at 15:22)</a>:</h4>
<p>but I hope to do another pass over the table and actually create the issues for the related rows.</p>



<a name="126981260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126981260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126981260">(May 23 2018 at 15:22)</a>:</h4>
<p>Not right now though, have to go!</p>



<a name="126981487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126981487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126981487">(May 23 2018 at 15:26)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> awesome</p>



<a name="126985199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126985199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126985199">(May 23 2018 at 16:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> so I was specifically looking at <code>augmented-assignments.stderr</code> from <a href="https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa" target="_blank" title="https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa">the paper document</a> as a good starting diagnostics issue</p>



<a name="126985202"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126985202" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126985202">(May 23 2018 at 16:53)</a>:</h4>
<p>not sure if there is a rust issue filed for that or not yet</p>



<a name="126985413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126985413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126985413">(May 23 2018 at 16:58)</a>:</h4>
<p>looks like no, I filed <a href="https://github.com/rust-lang/rust/issues/51000" target="_blank" title="https://github.com/rust-lang/rust/issues/51000">https://github.com/rust-lang/rust/issues/51000</a></p>



<a name="126985720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126985720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126985720">(May 23 2018 at 17:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> added some <a href="https://github.com/rust-lang/rust/issues/51000#issuecomment-391425650" target="_blank" title="https://github.com/rust-lang/rust/issues/51000#issuecomment-391425650">mentoring notes</a></p>



<a name="126987061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126987061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126987061">(May 23 2018 at 17:36)</a>:</h4>
<p>cool</p>



<a name="126987070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126987070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126987070">(May 23 2018 at 17:36)</a>:</h4>
<p>will check all this out later</p>



<a name="126995224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995224">(May 23 2018 at 20:21)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I'm tackling this</p>



<a name="126995229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995229">(May 23 2018 at 20:22)</a>:</h4>
<p>was reading the issue</p>



<a name="126995283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995283">(May 23 2018 at 20:22)</a>:</h4>
<p>in the first part you said</p>



<a name="126995287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995287">(May 23 2018 at 20:22)</a>:</h4>
<p><code>unclear that the original selection is so great either. Maybe the += would be ideal.</code></p>



<a name="126995293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995293">(May 23 2018 at 20:22)</a>:</h4>
<p>what do you mean by original selection?</p>



<a name="126995302"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995302" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995302">(May 23 2018 at 20:22)</a>:</h4>
<p>by original you meant non NLL?</p>



<a name="126995443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995443">(May 23 2018 at 20:25)</a>:</h4>
<p>if I got it correctly by original selection you meant non NLL which is <code>x</code> the one after <code>+=</code></p>



<a name="126995454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995454">(May 23 2018 at 20:25)</a>:</h4>
<p>nll selection is <code>+= x</code></p>



<a name="126995459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995459">(May 23 2018 at 20:25)</a>:</h4>
<p>and you want just <code>+=</code></p>



<a name="126995463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995463">(May 23 2018 at 20:25)</a>:</h4>
<p>is that correct?</p>



<a name="126995471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995471">(May 23 2018 at 20:25)</a>:</h4>
<p>it's weird to just highlight <code>+=</code></p>



<a name="126995475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995475">(May 23 2018 at 20:25)</a>:</h4>
<p>well I think the <code>+=</code> would be my ideal</p>



<a name="126995482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995482">(May 23 2018 at 20:25)</a>:</h4>
<p>but I guess it's a matter of taste :)</p>



<a name="126995489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995489">(May 23 2018 at 20:26)</a>:</h4>
<p>explain :)</p>



<a name="126995493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995493">(May 23 2018 at 20:26)</a>:</h4>
<p>anything that is not multi-line is going to be an improvement</p>



<a name="126995538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995538">(May 23 2018 at 20:26)</a>:</h4>
<p>(to start)</p>



<a name="126995542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995542">(May 23 2018 at 20:26)</a>:</h4>
<p>I mean with that selection the error will never show x</p>



<a name="126995544"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995544" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995544">(May 23 2018 at 20:26)</a>:</h4>
<p>I personally find underlining the operator very clear:</p>



<a name="126995545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995545">(May 23 2018 at 20:26)</a>:</h4>
<p>the error occurs when executing this operator</p>



<a name="126995560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995560">(May 23 2018 at 20:26)</a>:</h4>
<p><em>typically</em> the stuff is all on one line</p>



<a name="126995567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995567">(May 23 2018 at 20:26)</a>:</h4>
<p>e.g., <code>x += x</code></p>



<a name="126995573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995573">(May 23 2018 at 20:26)</a>:</h4>
<p>I guess in that sense the test is kind of artificial</p>



<a name="126995580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995580">(May 23 2018 at 20:27)</a>:</h4>
<p>and maybe we over-rated its importance</p>



<a name="126995587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995587">(May 23 2018 at 20:27)</a>:</h4>
<p>anyway I suspect it's fine to just match the existing behavior</p>



<a name="126995611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995611">(May 23 2018 at 20:27)</a>:</h4>
<p>actually</p>



<a name="126995615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995615">(May 23 2018 at 20:27)</a>:</h4>
<p>in the existing behavior</p>



<a name="126995622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995622">(May 23 2018 at 20:27)</a>:</h4>
<div class="codehilite"><pre><span></span>23 |     x   //~ error: use of moved value: `x`
   |     ^ value used here after move
</pre></div>



<a name="126995632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995632">(May 23 2018 at 20:27)</a>:</h4>
<p>how do you know that <code>x</code> is used?</p>



<a name="126995674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995674">(May 23 2018 at 20:28)</a>:</h4>
<p>if <code>=</code> never shows up in the error</p>



<a name="126995712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995712">(May 23 2018 at 20:28)</a>:</h4>
<p>not sure in this kind of multi line statements that is helpful to remove parts of the statement that are in different lines</p>



<a name="126995716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995716">(May 23 2018 at 20:28)</a>:</h4>
<p>besides from what you highlight</p>



<a name="126995735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995735">(May 23 2018 at 20:29)</a>:</h4>
<p>that seems like an orthogonal concern</p>



<a name="126995736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995736">(May 23 2018 at 20:29)</a>:</h4>
<p>first, I guess is better to show the statement entirely</p>



<a name="126995742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995742">(May 23 2018 at 20:29)</a>:</h4>
<p>not if we underline it</p>



<a name="126995744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995744">(May 23 2018 at 20:29)</a>:</h4>
<p>:)</p>



<a name="126995749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995749">(May 23 2018 at 20:29)</a>:</h4>
<p>hehe yes</p>



<a name="126995751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995751">(May 23 2018 at 20:29)</a>:</h4>
<p>that is basically always worse</p>



<a name="126995754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995754">(May 23 2018 at 20:29)</a>:</h4>
<p>but you could imagine some kind of heuristic in the error reporter  that "grows" a span</p>



<a name="126995758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995758">(May 23 2018 at 20:29)</a>:</h4>
<p>but if you only underline += will x show up?</p>



<a name="126995759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995759">(May 23 2018 at 20:29)</a>:</h4>
<p>but .. it's kind of tricky</p>



<a name="126995766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995766">(May 23 2018 at 20:30)</a>:</h4>
<p>no, but so what?</p>



<a name="126995824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995824">(May 23 2018 at 20:30)</a>:</h4>
<p>I guess what I mean is that</p>



<a name="126995827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995827">(May 23 2018 at 20:30)</a>:</h4>
<p>I don't know how realistic this test is :)</p>



<a name="126995835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995835">(May 23 2018 at 20:30)</a>:</h4>
<p>more commonly, I think that the <code>+=</code> is not on a line by itself</p>



<a name="126995845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995845">(May 23 2018 at 20:30)</a>:</h4>
<div class="codehilite"><pre><span></span>24 |     +=
   |      ^ value used here after move
</pre></div>



<a name="126995846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995846">(May 23 2018 at 20:31)</a>:</h4>
<p>(but that argues perhaps it's not an important bug to fix...)</p>



<a name="126995873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995873">(May 23 2018 at 20:31)</a>:</h4>
<div class="codehilite"><pre><span></span>24 |     +=
   |      ^ value used here after move
</pre></div>


<p>this doesn't tell me anything :P</p>



<a name="126995882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995882">(May 23 2018 at 20:31)</a>:</h4>
<p>it looks like in the original we underline the left-hand-side of the <code>+=</code></p>



<a name="126995926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995926">(May 23 2018 at 20:32)</a>:</h4>
<p>yes</p>



<a name="126995927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995927">(May 23 2018 at 20:32)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> well, I mean, you have to look at the source, sure</p>



<a name="126995932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995932">(May 23 2018 at 20:32)</a>:</h4>
<p>anyway, so why don't we just match the original?</p>



<a name="126995938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995938">(May 23 2018 at 20:32)</a>:</h4>
<p>I think realistic output would be:</p>



<a name="126995946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995946">(May 23 2018 at 20:32)</a>:</h4>
<div class="codehilite"><pre><span></span>24 |     x +=
   |       -- value used here after move
</pre></div>



<a name="126995958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995958">(May 23 2018 at 20:32)</a>:</h4>
<p>which is perhaps clearer</p>



<a name="126995963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995963">(May 23 2018 at 20:33)</a>:</h4>
<p>yeah, I'm not sure if I'm saying something practical or easy to implement or even a better thing :P, was just thinking a bit on the thing</p>



<a name="126995965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995965">(May 23 2018 at 20:33)</a>:</h4>
<p>but anyway, let's match the current behavior, it's easier anyway =)</p>



<a name="126995982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995982">(May 23 2018 at 20:33)</a>:</h4>
<p><span class="emoji emoji-1f44d" title="+1">:+1:</span></p>



<a name="126995984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995984">(May 23 2018 at 20:33)</a>:</h4>
<p>I think to do that, we have to extract the span of the LHS of the <code>+=</code></p>



<a name="126995989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126995989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126995989">(May 23 2018 at 20:33)</a>:</h4>
<p>and use it in place of the current <code>expr_span</code></p>



<a name="126996001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126996001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126996001">(May 23 2018 at 20:34)</a>:</h4>
<blockquote>
<p>yeah, I'm not sure if I'm saying something practical or easy to implement or even a better thing :P, was just thinking a bit on the thing</p>
</blockquote>
<p>well it's good to question my assumptions :) to me underlining the operator is super clear, but my brain sometimes works differently than others</p>



<a name="126996095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126996095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126996095">(May 23 2018 at 20:35)</a>:</h4>
<p>having doubts about what you think is like when you think you found a bug in the compiler, you will almost always be wrong ;)</p>



<a name="126996102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126996102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126996102">(May 23 2018 at 20:35)</a>:</h4>
<p>but helps in trying to understand stuff</p>



<a name="126996104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126996104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126996104">(May 23 2018 at 20:35)</a>:</h4>
<p>maybe not in this case...</p>



<a name="126996106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126996106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126996106">(May 23 2018 at 20:35)</a>:</h4>
<p>I think like a compiler author :)</p>



<a name="126996159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126996159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126996159">(May 23 2018 at 20:36)</a>:</h4>
<p>that said, I think there is precedent for this: e.g., clang underlines the operator sometimes</p>



<a name="126996178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126996178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126996178">(May 23 2018 at 20:36)</a>:</h4>
<p>looks like both of you are having fun working on the diagnostics</p>



<a name="126996182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126996182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126996182">(May 23 2018 at 20:36)</a>:</h4>
<p>will join you on one issue later today</p>



<a name="126996196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126996196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126996196">(May 23 2018 at 20:37)</a>:</h4>
<p>there's a lot more, to be sure</p>



<a name="126996204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126996204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126996204">(May 23 2018 at 20:37)</a>:</h4>
<p>I think the closure one is a good pick but I didn't want to do my homework to dig in :) happy to help answer questions though</p>



<a name="126996299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126996299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126996299">(May 23 2018 at 20:39)</a>:</h4>
<p>not sure which one you're talking about; is it issue-45983?</p>



<a name="126996368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126996368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126996368">(May 23 2018 at 20:40)</a>:</h4>
<p>I meant e.g. borrowck/issue-45983.nll.stderr</p>



<a name="126996378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126996378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126996378">(May 23 2018 at 20:41)</a>:</h4>
<p>but borrowck/borrowck-move-error-with-note.stderr   is also pretty bad</p>



<a name="126999635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126999635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126999635">(May 23 2018 at 21:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> so it looks like, for that example, we used to offer a suggestion ("consider adding <code>mut</code>") that we no longer do; that is a simple enough thing, and might be worth re-adding</p>



<a name="126999645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126999645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126999645">(May 23 2018 at 21:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> could probably advise, given their work on the "unused mutability" lint</p>



<a name="126999648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126999648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126999648">(May 23 2018 at 21:54)</a>:</h4>
<p>however, not sure if it is top priority</p>



<a name="126999688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126999688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126999688">(May 23 2018 at 21:54)</a>:</h4>
<p>let me look at the rest of the list</p>



<a name="126999730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126999730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126999730">(May 23 2018 at 21:55)</a>:</h4>
<p>lots of the closure cases, which I think are also imp't</p>



<a name="126999732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126999732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126999732">(May 23 2018 at 21:55)</a>:</h4>
<p>there is <code>lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr</code>, which is very odd</p>



<a name="126999789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126999789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126999789">(May 23 2018 at 21:56)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> up for a challenge? :)</p>



<a name="126999802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126999802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126999802">(May 23 2018 at 21:57)</a>:</h4>
<p>I think that investigating <code>lifetime-errors/ex2c-push-inference-variable.nll.stderr</code> would be great, and might give you some insight into how to solve some of the other tricky ones</p>



<a name="126999805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126999805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126999805">(May 23 2018 at 21:57)</a>:</h4>
<p>I'm gonna have to run though shortly</p>



<a name="126999852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126999852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126999852">(May 23 2018 at 21:58)</a>:</h4>
<p>it's interesting to compare the <a href="https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa" target="_blank" title="https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa">NLL error</a> and the <a href="https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa" target="_blank" title="https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa">non-NLL</a> <a href="https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa" target="_blank" title="https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa">from the paper doc though</a></p>



<a name="126999898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/126999898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#126999898">(May 23 2018 at 21:59)</a>:</h4>
<p><span class="emoji emoji-1f44d" title="+1">:+1:</span></p>



<a name="127000065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127000065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127000065">(May 23 2018 at 22:04)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> opened up <a href="https://github.com/rust-lang/rust/issues/51012" target="_blank" title="https://github.com/rust-lang/rust/issues/51012">https://github.com/rust-lang/rust/issues/51012</a></p>



<a name="127005232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127005232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127005232">(May 24 2018 at 00:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> ever figure out what was up w/ the span?</p>



<a name="127005326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127005326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127005326">(May 24 2018 at 00:22)</a>:</h4>
<p>will be back to the chat in a bit</p>



<a name="127005330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127005330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127005330">(May 24 2018 at 00:22)</a>:</h4>
<p>will you be around?</p>



<a name="127005335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127005335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127005335">(May 24 2018 at 00:22)</a>:</h4>
<p>short answer is ... kind is Call</p>



<a name="127005348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127005348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127005348">(May 24 2018 at 00:23)</a>:</h4>
<p>couldn’t debug properly yet because I had no more time</p>



<a name="127005425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127005425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127005425">(May 24 2018 at 00:26)</a>:</h4>
<blockquote>
<p>will you be around?</p>
</blockquote>
<p>maybe</p>



<a name="127027358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027358">(May 24 2018 at 12:52)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> so as I was saying yesterday kind is of type Call and not AssignOp</p>



<a name="127027363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027363">(May 24 2018 at 12:52)</a>:</h4>
<p>well in reality it starts as kind Scope</p>



<a name="127027368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027368">(May 24 2018 at 12:53)</a>:</h4>
<div class="codehilite"><pre><span></span>DEBUG 2018-05-24T12:45:35Z: rustc_mir::build::expr::stmt: expr=Expr { ty: (), temp_lifetime: Some(Node(ItemLocalId(10))), span: src/test/ui/augmented-assignments.rs:25:5: 28:6, kind: Scope { region_scope: Node(ItemLocalId(9)), lint_level: Explicit(NodeId(34)), value: Mirror(Expr { ty: (), temp_lifetime: Some(Node(ItemLocalId(10))), span: src/test/ui/augmented-assignments.rs:25:5: 28:6, kind: Call { ty: for&lt;&#39;r&gt; fn(&amp;&#39;r mut Int, Int) {&lt;Int as std::ops::AddAssign&gt;::add_assign}, fun: Mirror(Expr { ty: for&lt;&#39;r&gt; fn(&amp;&#39;r mut Int, Int) {&lt;Int as std::ops::AddAssign&gt;::add_assign}, temp_lifetime: Some(Node(ItemLocalId(10))), span: src/test/ui/augmented-assignments.rs:25:5: 28:6, kind: Literal { literal: const std::ops::AddAssign::add_assign } }), args: [Hair(expr(32: x)), Hair(expr(33: x))] } }) } }
</pre></div>



<a name="127027379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027379">(May 24 2018 at 12:53)</a>:</h4>
<p>and Scope arm does ...</p>



<a name="127027381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027381">(May 24 2018 at 12:53)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">                </span><span class="n">this</span><span class="p">.</span><span class="n">in_scope</span><span class="p">((</span><span class="n">region_scope</span><span class="p">,</span><span class="w"> </span><span class="n">source_info</span><span class="p">),</span><span class="w"> </span><span class="n">lint_level</span><span class="p">,</span><span class="w"> </span><span class="n">block</span><span class="p">,</span><span class="w"> </span><span class="o">|</span><span class="n">this</span><span class="o">|</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="n">this</span><span class="p">.</span><span class="n">stmt_expr</span><span class="p">(</span><span class="n">block</span><span class="p">,</span><span class="w"> </span><span class="n">value</span><span class="p">)</span><span class="w"></span>
<span class="w">                </span><span class="p">})</span><span class="w"></span>
</pre></div>



<a name="127027429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027429">(May 24 2018 at 12:54)</a>:</h4>
<p>and that second call gives an <code>ExprKind::Call</code></p>



<a name="127027438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027438">(May 24 2018 at 12:54)</a>:</h4>
<p>that's because the test does ...</p>



<a name="127027441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027441">(May 24 2018 at 12:54)</a>:</h4>
<div class="codehilite"><pre><span></span>impl AddAssign for Int {
    fn add_assign(&amp;mut self, _: Int) {
        unimplemented!()
    }
}
</pre></div>



<a name="127027518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027518">(May 24 2018 at 12:56)</a>:</h4>
<p>hmm I guess I know what we can do ... trying ...</p>



<a name="127027524"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027524" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027524">(May 24 2018 at 12:56)</a>:</h4>
<p>hmm I'm a bit confused :)</p>



<a name="127027530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027530">(May 24 2018 at 12:57)</a>:</h4>
<p>I mean everything you've posted makes sense to me :)</p>



<a name="127027532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027532">(May 24 2018 at 12:57)</a>:</h4>
<p>but one question I have: did you figure out which statement the span comes from in the MIR?</p>



<a name="127027797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027797">(May 24 2018 at 13:04)</a>:</h4>
<p>haven't checked that</p>



<a name="127027802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027802">(May 24 2018 at 13:05)</a>:</h4>
<p>we have this ...</p>



<a name="127027803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027803">(May 24 2018 at 13:05)</a>:</h4>
<p>OK</p>



<a name="127027821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027821">(May 24 2018 at 13:05)</a>:</h4>
<div class="codehilite"><pre><span></span>            _ =&gt; {
                let expr_ty = expr.ty;
                let temp = this.temp(expr.ty.clone(), expr_span);
                unpack!(block = this.into(&amp;temp, block, expr));
                unpack!(block = this.build_drop(block, expr_span, temp, expr_ty));
                block.unit()
            }
</pre></div>



<a name="127027861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027861">(May 24 2018 at 13:06)</a>:</h4>
<p>wanted to check quickly by doing ...</p>



<a name="127027867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027867">(May 24 2018 at 13:06)</a>:</h4>
<div class="codehilite"><pre><span></span>            ExprKind::Call { ty: _, fun, args: _} =&gt; {
                let fun = this.hir.mirror(fun);
                let expr_ty = expr.ty;
                let temp = this.temp(expr.ty.clone(), expr_span);
                unpack!(block = this.into(&amp;temp, block, expr));
                unpack!(block = this.build_drop(block, fun.span, temp, expr_ty));
                block.unit()
            }
</pre></div>



<a name="127027871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027871">(May 24 2018 at 13:06)</a>:</h4>
<p>basically for call change expr.span with fun.span</p>



<a name="127027942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027942">(May 24 2018 at 13:08)</a>:</h4>
<div class="codehilite"><pre><span></span>152 |                 unpack!(block = this.into(&amp;temp, block, expr));
    |                                                         ^^^^ value used here after move
</pre></div>



<a name="127027943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127027943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127027943">(May 24 2018 at 13:08)</a>:</h4>
<p>:)</p>



<a name="127028093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028093">(May 24 2018 at 13:12)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> do you need to use <code>ref fun</code> or something?</p>



<a name="127028097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028097">(May 24 2018 at 13:12)</a>:</h4>
<p>/me hasn't looked carefully at surrounding context; just a guess from the code as listed</p>



<a name="127028161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028161">(May 24 2018 at 13:14)</a>:</h4>
<p>yeah, tried that but mirror need to take ownership of fun after that</p>



<a name="127028185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028185">(May 24 2018 at 13:15)</a>:</h4>
<div class="codehilite"><pre><span></span>error[E0507]: cannot move out of borrowed content
   --&gt; librustc_mir/build/expr/stmt.rs:149:43
    |
149 |                 let fun = this.hir.mirror(*fun);
    |                                           ^^^^ cannot move out of borrowed content

error[E0505]: cannot move out of `expr` because it is borrowed
   --&gt; librustc_mir/build/expr/stmt.rs:152:57
    |
148 |             ExprKind::Call { ty: _, ref fun, args: _} =&gt; {
    |                                     ------- borrow of `expr.kind.fun` occurs here
...
152 |                 unpack!(block = this.into(&amp;temp, block, expr));
    |                                                         ^^^^ move out of `expr` occurs here
</pre></div>



<a name="127028229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028229">(May 24 2018 at 13:16)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> if I do <code>ref fun</code> <span class="emoji emoji-261d" title="point up">:point_up:</span></p>



<a name="127028374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028374">(May 24 2018 at 13:20)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> can you send me a link into the source?</p>



<a name="127028385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028385">(May 24 2018 at 13:20)</a>:</h4>
<p>(the "mirror" stuff is a bit artificial; it is used to convert the HIR "bit by bit" into HAIR, but I've thought about just converting everything in one big pass for a given fn and removing the mirror traits...)</p>



<a name="127028389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028389">(May 24 2018 at 13:20)</a>:</h4>
<p>but if needed we can extend the trait with some peak to "peek" at the span</p>



<a name="127028392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028392">(May 24 2018 at 13:21)</a>:</h4>
<p>that said, usually it is possible to <code>mirror</code> first</p>



<a name="127028397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028397">(May 24 2018 at 13:21)</a>:</h4>
<p>and to pass the mirrored result</p>



<a name="127028652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028652">(May 24 2018 at 13:27)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <a href="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/build/expr/stmt.rs#L141-L147" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/build/expr/stmt.rs#L141-L147">https://github.com/rust-lang/rust/blob/master/src/librustc_mir/build/expr/stmt.rs#L141-L147</a></p>



<a name="127028705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028705">(May 24 2018 at 13:28)</a>:</h4>
<p>I was just trying to extract <code>Call</code> from there</p>



<a name="127028710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028710">(May 24 2018 at 13:28)</a>:</h4>
<p>with the code I've showed you</p>



<a name="127028720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028720">(May 24 2018 at 13:28)</a>:</h4>
<p>so I can use <code>fun.span</code></p>



<a name="127028726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028726">(May 24 2018 at 13:28)</a>:</h4>
<p>which I'm not 100% sure what it gives but I guess is what I need</p>



<a name="127028727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028727">(May 24 2018 at 13:29)</a>:</h4>
<p>you're saying that this <code>expr_span</code> (from the call) is where you think the error is ultimately coming from?</p>



<a name="127028749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028749">(May 24 2018 at 13:29)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> argh so .. what test are we looing at again? (just to make sure you and I are thinknig of the same test)</p>



<a name="127028819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028819">(May 24 2018 at 13:31)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/master/src/test/ui/augmented-assignments.rs" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/test/ui/augmented-assignments.rs">https://github.com/rust-lang/rust/blob/master/src/test/ui/augmented-assignments.rs</a></p>



<a name="127028824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028824">(May 24 2018 at 13:31)</a>:</h4>
<blockquote>
<p>you're saying that this <code>expr_span</code> (from the call) is where you think the error is ultimately coming from?</p>
</blockquote>
<p>yes</p>



<a name="127028869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028869">(May 24 2018 at 13:32)</a>:</h4>
<p>I'm not 100% sure what expr.span and what fun.span are exactly</p>



<a name="127028873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028873">(May 24 2018 at 13:32)</a>:</h4>
<p>I'd need to investigate a bit more</p>



<a name="127028877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028877">(May 24 2018 at 13:32)</a>:</h4>
<p>was just trying to quickly test</p>



<a name="127028878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028878">(May 24 2018 at 13:32)</a>:</h4>
<p>well if you have <code>foo(bar)</code> then <code>expr_span</code> would cover the whole call, and <code>fun.span</code> would just cover <code>foo</code></p>



<a name="127028879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028879">(May 24 2018 at 13:32)</a>:</h4>
<p>that said, I think the reaosn you are seeing this <em>here</em></p>



<a name="127028880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028880">(May 24 2018 at 13:32)</a>:</h4>
<p>:)</p>



<a name="127028881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028881">(May 24 2018 at 13:32)</a>:</h4>
<p>that's was my guess</p>



<a name="127028882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028882">(May 24 2018 at 13:32)</a>:</h4>
<p>is because <code>x += y</code> is being desugared into a call to a trait method</p>



<a name="127028884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028884">(May 24 2018 at 13:32)</a>:</h4>
<p>so ... doing fun.span would work</p>



<a name="127028890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028890">(May 24 2018 at 13:33)</a>:</h4>
<p>yeah += is the fun</p>



<a name="127028897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028897">(May 24 2018 at 13:33)</a>:</h4>
<p>yeah so I'm not sure just how the spans got setup in that case</p>



<a name="127028898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028898">(May 24 2018 at 13:33)</a>:</h4>
<p>we'd have to consult the HAIR desugaring</p>



<a name="127028910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028910">(May 24 2018 at 13:33)</a>:</h4>
<p>now the thing is how do I get rid of borrowck issues with the code I'm trying to write :P</p>



<a name="127028913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028913">(May 24 2018 at 13:33)</a>:</h4>
<p>specifically <a href="https://github.com/rust-lang/rust/blob/a76bff86e6f4b56b2c3fd1704ce8535ed207dd78/src/librustc_mir/hair/cx/expr.rs#L306" target="_blank" title="https://github.com/rust-lang/rust/blob/a76bff86e6f4b56b2c3fd1704ce8535ed207dd78/src/librustc_mir/hair/cx/expr.rs#L306">this function call here</a></p>



<a name="127028983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127028983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127028983">(May 24 2018 at 13:35)</a>:</h4>
<p>tracing through a bit I suspect the span on <code>fun</code> might be the same as <code>expr_span</code> =)</p>



<a name="127029044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029044">(May 24 2018 at 13:36)</a>:</h4>
<p>:(</p>



<a name="127029070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029070">(May 24 2018 at 13:37)</a>:</h4>
<p>interesting problem :)</p>



<a name="127029080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029080">(May 24 2018 at 13:37)</a>:</h4>
<p>see, here, my sense is that the span of <code>+=</code> is <em>perfect</em> to use for the span of the "function being called" in <code>x += y</code> :)</p>



<a name="127029121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029121">(May 24 2018 at 13:38)</a>:</h4>
<p>well, actually, this is coming back to a concern I had early on</p>



<a name="127029124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029124">(May 24 2018 at 13:38)</a>:</h4>
<p>remember <span class="user-mention" data-user-id="116083">@pnkfelix</span> when I was saying that we might want to extend MIR to have each <code>Lvalue</code> have a span?</p>



<a name="127029125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029125">(May 24 2018 at 13:38)</a>:</h4>
<p>that seems relevant here</p>



<a name="127029129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029129">(May 24 2018 at 13:38)</a>:</h4>
<p>we are using the span of the <em>statement</em> but really we want the span (I suspect) of the <em><code>Place</code> within the statement</em></p>



<a name="127029154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029154">(May 24 2018 at 13:39)</a>:</h4>
<p>yeah, that or have assignments carry multiple spans...?</p>



<a name="127029155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029155">(May 24 2018 at 13:39)</a>:</h4>
<p>(but that seems silly)</p>



<a name="127029162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029162">(May 24 2018 at 13:39)</a>:</h4>
<p>((although it might be less painful to implement in the short term...?))</p>



<a name="127029227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029227">(May 24 2018 at 13:40)</a>:</h4>
<p>hmm</p>



<a name="127029230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029230">(May 24 2018 at 13:40)</a>:</h4>
<p>this is not an assignment</p>



<a name="127029233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029233">(May 24 2018 at 13:40)</a>:</h4>
<p>it's an overloaded method call</p>



<a name="127029234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029234">(May 24 2018 at 13:40)</a>:</h4>
<p>so i'm looking at closure diagnostics rn, and one thing i immediately hit upon is the concept of "free regions"</p>



<a name="127029238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029238">(May 24 2018 at 13:40)</a>:</h4>
<p>i've no idea what those are</p>



<a name="127029261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029261">(May 24 2018 at 13:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> I was going to point you at the <a href="https://github.com/rust-lang-nursery/rustc-guide/blob/master/src/mir-regionck.md" target="_blank" title="https://github.com/rust-lang-nursery/rustc-guide/blob/master/src/mir-regionck.md">rustc-guide coverage of the topic</a>, but it appears I left it TBD :(</p>



<a name="127029323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029323">(May 24 2018 at 13:42)</a>:</h4>
<p>a "free region" (aka "universal region") is basically a lifetime parameter</p>



<a name="127029327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029327">(May 24 2018 at 13:42)</a>:</h4>
<p>or some lifetime that appears in the fn signature</p>



<a name="127029495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029495">(May 24 2018 at 13:46)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> well.. I'm not sure what's the best way to continue. This may turn into a larger refactoring.</p>



<a name="127029499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029499">(May 24 2018 at 13:46)</a>:</h4>
<p>that said, I think that maybe we should shelve this issue, because I'm not sure just how bad it is</p>



<a name="127029505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029505">(May 24 2018 at 13:46)</a>:</h4>
<p>that is, I Think it looks extra bad because the source is written in such a way that it spans multiple lines</p>



<a name="127029520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029520">(May 24 2018 at 13:47)</a>:</h4>
<p>though I think long term we <em>do</em> want to modify mir <code>Place</code> to carry a span</p>



<a name="127029524"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029524" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029524">(May 24 2018 at 13:47)</a>:</h4>
<p>but that will mean reworking the borrowck a bit</p>



<a name="127029526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029526">(May 24 2018 at 13:47)</a>:</h4>
<p>it's probably not <em>that</em> hard really</p>



<a name="127029532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029532">(May 24 2018 at 13:47)</a>:</h4>
<p>it might really be needed to solve a bunch of diagnostic spans actually</p>



<a name="127029537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029537">(May 24 2018 at 13:47)</a>:</h4>
<p>i at least found out where exactly the error message is generated</p>



<a name="127029541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029541">(May 24 2018 at 13:47)</a>:</h4>
<p>/me goes back to sleep for a while before his day starts</p>



<a name="127029588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029588">(May 24 2018 at 13:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> I can try to give you some tips later perhaps</p>



<a name="127029851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029851">(May 24 2018 at 13:55)</a>:</h4>
<p>(in response to "these are overloaded method calls") okay, true. But method calls as terminators are just really heavy weight instances of assignments,right?</p>



<a name="127029860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127029860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127029860">(May 24 2018 at 13:55)</a>:</h4>
<p>(anyway it was just a throwaway remark)</p>



<a name="127030066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127030066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127030066">(May 24 2018 at 14:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> depends on your POV :) my point is that adding just to <code>StmtAssign</code> would not suffice</p>



<a name="127030074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127030074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127030074">(May 24 2018 at 14:01)</a>:</h4>
<p>agreed</p>



<a name="127030138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127030138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127030138">(May 24 2018 at 14:02)</a>:</h4>
<p>It was really just a question of "would a series of band-aid extensions to individual Stmt/Terminator variants be 'simpler' to implement than trying to add span to every Lvalue</p>



<a name="127030216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127030216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127030216">(May 24 2018 at 14:04)</a>:</h4>
<blockquote>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> well.. I'm not sure what's the best way to continue. This may turn into a larger refactoring.</p>
</blockquote>
<p><span class="emoji emoji-1f44d" title="+1">:+1:</span></p>



<a name="127030790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127030790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127030790">(May 24 2018 at 14:18)</a>:</h4>
<blockquote>
<p>It was really just a question of "would a series of band-aid extensions to individual Stmt/Terminator variants be 'simpler' to implement than trying to add span to every Lvalue</p>
</blockquote>
<p>yeah — and I guess the answer is ... maybe?</p>



<a name="127030802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127030802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127030802">(May 24 2018 at 14:18)</a>:</h4>
<p>another idea: we could refactor <code>Operand</code> to have a span</p>



<a name="127030816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127030816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127030816">(May 24 2018 at 14:18)</a>:</h4>
<p>that woudlnt' be too hard, might suffice</p>



<a name="127032811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127032811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127032811">(May 24 2018 at 15:01)</a>:</h4>
<blockquote>
<p>a "free region" (aka "universal region") is basically a lifetime parameter</p>
</blockquote>
<p>Just to double check my understanding, these are also called "universal regions" right? Or are universal regions only things that actually live for every point in the CFG</p>



<a name="127032876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127032876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127032876">(May 24 2018 at 15:02)</a>:</h4>
<p>same thing</p>



<a name="127032880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127032880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127032880">(May 24 2018 at 15:02)</a>:</h4>
<p>I've been wrestling with the best terminology</p>



<a name="127032883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127032883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127032883">(May 24 2018 at 15:02)</a>:</h4>
<p>"free" is a kind of general PL term though</p>



<a name="127032888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127032888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127032888">(May 24 2018 at 15:02)</a>:</h4>
<p>referring to something that is not "bound" within a term or expression</p>



<a name="127032913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127032913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127032913">(May 24 2018 at 15:03)</a>:</h4>
<p>so e.g. if we say that the statement <code>S</code> is <code>let x = y + z</code>, then <code>y</code> and <code>z</code> "appear free" in <code>S</code>, but <code>x</code> is bound in <code>S</code></p>



<a name="127032922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127032922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127032922">(May 24 2018 at 15:03)</a>:</h4>
<p>I was calling them "universal regions" because they are universally quantified ("forall")</p>



<a name="127032926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127032926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127032926">(May 24 2018 at 15:03)</a>:</h4>
<p>so e.g. <code>fn foo&lt;'a&gt; (...)</code> works for any region <code>'a</code></p>



<a name="127032928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127032928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127032928">(May 24 2018 at 15:03)</a>:</h4>
<p>just as <code>fn foo&lt;T&gt;(...)</code> works any type <code>T</code></p>



<a name="127033157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127033157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127033157">(May 24 2018 at 15:09)</a>:</h4>
<p>So they are both free and universal, and we're lazy and occasionally only use one of those words?</p>



<a name="127033158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127033158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127033158">(May 24 2018 at 15:09)</a>:</h4>
<p>There is also explicit universal quantification syntax though</p>



<a name="127033159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127033159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127033159">(May 24 2018 at 15:09)</a>:</h4>
<p>which I think is used for declaring closures, where the incoming regions are neither free nor universal (unless declared to be so via <code>for &lt;'a&gt;</code> syntax if I'm understanding correctly)</p>



<a name="127033160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127033160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127033160">(May 24 2018 at 15:09)</a>:</h4>
<p>I guess they're always free+universal from the perspective of type checking within the closure themselves? just not the body of the surrounding fn</p>



<a name="127033914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127033914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127033914">(May 24 2018 at 15:24)</a>:</h4>
<p>as an observer, please dont let the super type theory leak out in the messages <span class="emoji emoji-1f649" title="hear no evil">:hear_no_evil:</span></p>



<a name="127033922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127033922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127033922">(May 24 2018 at 15:24)</a>:</h4>
<p>No skolemization redux</p>



<a name="127034001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127034001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127034001">(May 24 2018 at 15:26)</a>:</h4>
<p>I feel like "generic lifetime parameter" is an understood term. Could extend to "implicit G..L..P.." and "higher-ranked g..l..p" as needed</p>



<a name="127035274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127035274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127035274">(May 24 2018 at 15:56)</a>:</h4>
<blockquote>
<p>So they are both free and universal, and we're lazy and occasionally only use one of those words?</p>
</blockquote>
<p>yes, and — specifically — depending on your POV and the context, there may be free regions that are not universal</p>



<a name="127035288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127035288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127035288">(May 24 2018 at 15:57)</a>:</h4>
<blockquote>
<p>No skolemization redux</p>
</blockquote>
<p>skolemization was never .. intentionally in the error messages :) but yes, of course I agree.. I don't think anyone was talking about the phrasing of error messages here.</p>



<a name="127035581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127035581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127035581">(May 24 2018 at 16:03)</a>:</h4>
<p>I just note its the diagnostics thread, so I was worried <span class="emoji emoji-1f609" title="wink">:wink:</span></p>



<a name="127035692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127035692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> qmx <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127035692">(May 24 2018 at 16:05)</a>:</h4>
<p>c'mon, it took me a while to learn how to spell skolemization properly, now I want to inflict this pain on others &lt;/sarcasm&gt;</p>



<a name="127064974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127064974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127064974">(May 25 2018 at 05:02)</a>:</h4>
<p>"free regions associated with closures" how?</p>



<a name="127064986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127064986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127064986">(May 25 2018 at 05:03)</a>:</h4>
<p>i'm guessing that happens when you have a lifetime'd variable as a fn arg and then you reference it in a closure created inside the fn body?</p>



<a name="127070549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127070549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127070549">(May 25 2018 at 08:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> well, [issue-45983.rs(<a href="https://github.com/rust-lang/rust/blob/master/src/test/ui/borrowck/issue-45983.rs" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/test/ui/borrowck/issue-45983.rs">https://github.com/rust-lang/rust/blob/master/src/test/ui/borrowck/issue-45983.rs</a>) shows things like <code>fn give_any&lt;F: for&lt;'r&gt; FnOnce(&amp;'r ())&gt;(f: F) { ... }</code> and then elsewhere a call like <code>give_any(|y| x = Some(y));</code></p>



<a name="127070551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127070551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127070551">(May 25 2018 at 08:19)</a>:</h4>
<p>was in fact looking at that</p>



<a name="127070600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127070600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127070600">(May 25 2018 at 08:21)</a>:</h4>
<p>yeah I'd suggest perhaps start by surveying all the tests</p>



<a name="127070606"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127070606" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127070606">(May 25 2018 at 08:21)</a>:</h4>
<p>to identify the cases that lead to this</p>



<a name="127071357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127071357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127071357">(May 25 2018 at 08:49)</a>:</h4>
<p><span class="user-mention" data-user-id="116108">@Keith Yeung</span> not sure if this answers your question, but you may find <a href="https://github.com/rust-lang/rust/blob/7942022bf75be46e04ffc7874f705076a16da697/src/librustc_mir/borrow_check/nll/universal_regions.rs#L159-L199" target="_blank" title="https://github.com/rust-lang/rust/blob/7942022bf75be46e04ffc7874f705076a16da697/src/librustc_mir/borrow_check/nll/universal_regions.rs#L159-L199">this comment</a> interesting — it describes the different "categories" of universal regions and how each arises</p>



<a name="127073361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127073361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127073361">(May 25 2018 at 09:48)</a>:</h4>
<p>I have to say: Working on <a href="https://github.com/rust-lang/rust/issues/51025" target="_blank" title="https://github.com/rust-lang/rust/issues/51025">rust-lang/rust#51025</a>, I become contintually impressed by how much <em>more sane</em> Rust seems to be with NLL in place.</p>



<a name="127073372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127073372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127073372">(May 25 2018 at 09:49)</a>:</h4>
<p>I'm pretty excited to see its effects</p>



<a name="127073375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127073375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127073375">(May 25 2018 at 09:49)</a>:</h4>
<p>e.g. there were behaviors before that one sort of justified by saying "ah there are borrows, and lifetimes are lexical, so the compiler rejects this code, but oh it accepts this one, watch me wave my hands wildly"</p>



<a name="127073430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127073430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127073430">(May 25 2018 at 09:50)</a>:</h4>
<p>I was quite surprised to see this test in particular: <a href="https://github.com/rust-lang/rust/blob/master/src/test/ui/span/vec_refs_data_with_early_death.rs" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/test/ui/span/vec_refs_data_with_early_death.rs">vec_refs_data_with_early_death.rs</a></p>



<a name="127073432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127073432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127073432">(May 25 2018 at 09:50)</a>:</h4>
<p>Of all things that one would expect <code>#[may_dangle]</code> to take care of ...</p>



<a name="127075631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127075631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127075631">(May 25 2018 at 10:54)</a>:</h4>
<p>woot: <a href="https://github.com/rust-lang/rust/pull/51057" target="_blank" title="https://github.com/rust-lang/rust/pull/51057">https://github.com/rust-lang/rust/pull/51057</a></p>



<a name="127205634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127205634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127205634">(May 28 2018 at 13:24)</a>:</h4>
<p>So I've got my cannot-move-from errors branch using an approach that I'm a bit happier with.</p>



<a name="127205641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127205641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127205641">(May 28 2018 at 13:24)</a>:</h4>
<p>If anyone wants to suggest anything some examples of the output are here: <a href="https://gist.github.com/matthewjasper/15eac85086ee6a8adb806450b046c57a" target="_blank" title="https://gist.github.com/matthewjasper/15eac85086ee6a8adb806450b046c57a">https://gist.github.com/matthewjasper/15eac85086ee6a8adb806450b046c57a</a>.</p>



<a name="127205666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127205666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127205666">(May 28 2018 at 13:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116118">@Matthew Jasper</span> ooh, nice</p>



<a name="127249983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127249983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127249983">(May 29 2018 at 12:52)</a>:</h4>
<p><span class="user-mention" data-user-id="116118">@Matthew Jasper</span> is there an open issue that you know of? did you make a PR?</p>



<a name="127251498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127251498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127251498">(May 29 2018 at 13:25)</a>:</h4>
<p>I decided to call it <a href="https://github.com/rust-lang/rust/issues/45699" target="_blank" title="https://github.com/rust-lang/rust/issues/45699">#45699</a></p>



<a name="127261274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127261274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127261274">(May 29 2018 at 16:47)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> are you looking at <a href="https://github.com/rust-lang/rust/issues/51031" target="_blank" title="https://github.com/rust-lang/rust/issues/51031">https://github.com/rust-lang/rust/issues/51031</a> ?</p>



<a name="127261777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127261777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127261777">(May 29 2018 at 16:59)</a>:</h4>
<p>yes</p>



<a name="127261778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127261778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127261778">(May 29 2018 at 16:59)</a>:</h4>
<p>was starting now</p>



<a name="127261834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127261834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127261834">(May 29 2018 at 17:00)</a>:</h4>
<p>do you still want me to do it?</p>



<a name="127261928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127261928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127261928">(May 29 2018 at 17:02)</a>:</h4>
<p>yep</p>



<a name="127261955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127261955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127261955">(May 29 2018 at 17:03)</a>:</h4>
<p>tell me :)</p>



<a name="127262040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127262040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127262040">(May 29 2018 at 17:05)</a>:</h4>
<p>ahh sorry, I read it wrong</p>



<a name="127262048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127262048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127262048">(May 29 2018 at 17:05)</a>:</h4>
<p>ok starting this thing</p>



<a name="127262301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127262301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127262301">(May 29 2018 at 17:11)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> how do I test this?</p>



<a name="127262309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127262309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127262309">(May 29 2018 at 17:11)</a>:</h4>
<p>or better asked, what's the example you're using that triggers this issue?</p>



<a name="127262352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127262352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127262352">(May 29 2018 at 17:12)</a>:</h4>
<p>ahh sorry sorry, Felix, added a lot of examples</p>



<a name="127262362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127262362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127262362">(May 29 2018 at 17:12)</a>:</h4>
<p>forget about what I've said :P</p>



<a name="127262824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127262824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127262824">(May 29 2018 at 17:23)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> is there a way now to compile in nll mode without changing the file?</p>



<a name="127262865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127262865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127262865">(May 29 2018 at 17:24)</a>:</h4>
<p><code>rustc -Znll</code> :'(</p>



<a name="127262931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127262931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127262931">(May 29 2018 at 17:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> there is, <code>-Zborrowck=mir -Zallow-two-phase-borrows</code> I think will do it</p>



<a name="127262938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127262938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127262938">(May 29 2018 at 17:25)</a>:</h4>
<p>I was just complaining to <span class="user-mention" data-user-id="116083">@pnkfelix</span> earlier that this is too complicated :)</p>



<a name="127262979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127262979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127262979">(May 29 2018 at 17:26)</a>:</h4>
<p>I'd take a PR to change it to <code>-Zdisallow-two-phase-borrows</code> =)</p>



<a name="127262992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127262992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127262992">(May 29 2018 at 17:26)</a>:</h4>
<p>or perhaps <code>-Ztwo-phase-borrows=no</code> with <code>-Zallow-two-phase-borrows</code> being a deprecated no-op (I think it apperas in some places like perf?)</p>



<a name="127262993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127262993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127262993">(May 29 2018 at 17:26)</a>:</h4>
<p>ya, saw that way yesterday</p>



<a name="127262995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127262995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127262995">(May 29 2018 at 17:26)</a>:</h4>
<blockquote>
<p>I'd take a PR to change it to <code>-Zdisallow-two-phase-borrows</code> =)</p>
</blockquote>
<p>don't understand why that?</p>



<a name="127263000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263000">(May 29 2018 at 17:26)</a>:</h4>
<p>or what you mean exactly</p>



<a name="127263013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263013">(May 29 2018 at 17:27)</a>:</h4>
<p>so right now <code>#![feature(nll)]</code> implies those two <code>-Z</code> flags</p>



<a name="127263015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263015">(May 29 2018 at 17:27)</a>:</h4>
<p>We want to retain the ability to isolate two phase borrows</p>



<a name="127263019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263019">(May 29 2018 at 17:27)</a>:</h4>
<p>For debugging</p>



<a name="127263020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263020">(May 29 2018 at 17:27)</a>:</h4>
<p>what I mean is that I think we should <em>default</em> to the behavior that <code>#![feature(nll)]</code> gives you</p>



<a name="127263023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263023">(May 29 2018 at 17:27)</a>:</h4>
<p>and make you give add'l flags to disable 2-phase borrows</p>



<a name="127263026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263026">(May 29 2018 at 17:27)</a>:</h4>
<p>or make other changes</p>



<a name="127263091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263091">(May 29 2018 at 17:28)</a>:</h4>
<p>so you meant to say that <code>-Zborrowck=mir</code> implies <code>-Ztwo-phase-borrows</code>?</p>



<a name="127263105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263105">(May 29 2018 at 17:29)</a>:</h4>
<p>and in order to turn off you can <code>-Zdisallow-two-phase-borrows</code>?</p>



<a name="127263107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263107">(May 29 2018 at 17:29)</a>:</h4>
<p>did I follow correctly</p>



<a name="127263215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263215">(May 29 2018 at 17:31)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> yes</p>



<a name="127263231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263231">(May 29 2018 at 17:31)</a>:</h4>
<p>ok</p>



<a name="127263296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263296">(May 29 2018 at 17:32)</a>:</h4>
<p>or even <code>-Znll</code> imply those things and add <code>-Zdisallow-two-phase-borrows</code></p>



<a name="127263397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263397">(May 29 2018 at 17:34)</a>:</h4>
<p>was reading comments on <a href="https://github.com/rust-lang/rust/issues/51031" target="_blank" title="https://github.com/rust-lang/rust/issues/51031">https://github.com/rust-lang/rust/issues/51031</a></p>



<a name="127263405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263405">(May 29 2018 at 17:35)</a>:</h4>
<div class="codehilite"><pre><span></span>Notably, this call to is_mutable — when it returns Err — also returns some information about why this path is not mutable:
</pre></div>



<a name="127263417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263417">(May 29 2018 at 17:35)</a>:</h4>
<p>I guess what you mean is that given the if let the result when Err is being discarded and we need that</p>



<a name="127263470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263470">(May 29 2018 at 17:36)</a>:</h4>
<p>sorry if I ask trivial questions but from time to time I'm pretty sure I got 98% of the wording on things because of english issues and I want 100% :D</p>



<a name="127263481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263481">(May 29 2018 at 17:36)</a>:</h4>
<p>yes, right</p>



<a name="127263484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263484">(May 29 2018 at 17:36)</a>:</h4>
<p>and the other thing is</p>



<a name="127263502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263502">(May 29 2018 at 17:37)</a>:</h4>
<p>you mentioned calling <code>report_illegal_reassignment</code> function with parts of that Err stuff</p>



<a name="127263506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263506">(May 29 2018 at 17:37)</a>:</h4>
<p>that thing is already being called in the iter_incoming loop</p>



<a name="127263509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263509">(May 29 2018 at 17:37)</a>:</h4>
<p>is it there being called with other purposes?</p>



<a name="127263609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263609">(May 29 2018 at 17:39)</a>:</h4>
<p>don't know :)</p>



<a name="127263618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263618">(May 29 2018 at 17:39)</a>:</h4>
<p>but I doubt it</p>



<a name="127263620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263620">(May 29 2018 at 17:39)</a>:</h4>
<p>you'd have to ripgrep around</p>



<a name="127263675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263675">(May 29 2018 at 17:40)</a>:</h4>
<p>I should mention, once we fix this part, there are probably a few other cases w'ell want to tweak in similar ways — e.g., when you have an example like <code>&amp;mut foo</code> where <code>let foo</code></p>



<a name="127263704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127263704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127263704">(May 29 2018 at 17:41)</a>:</h4>
<p>ok</p>



<a name="127276379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276379">(May 29 2018 at 21:54)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Is rustc::infer::lexical_region_resolve intrinsically tied to AST-borrowck? Or will that remain in place even after a full switch to NLL ?</p>



<a name="127276387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276387">(May 29 2018 at 21:54)</a>:</h4>
<p>I hope to kill it after a full switch to NLL</p>



<a name="127276392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276392">(May 29 2018 at 21:54)</a>:</h4>
<p>but it's going to take a bit of work</p>



<a name="127276396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276396">(May 29 2018 at 21:54)</a>:</h4>
<p>it is also used to report some other errors unrelated to borrowck</p>



<a name="127276399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276399">(May 29 2018 at 21:55)</a>:</h4>
<p>So the cases where our only good diagnostic spans are attached to that "not reporting region error due to nll" message ...</p>



<a name="127276411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276411">(May 29 2018 at 21:55)</a>:</h4>
<p><em>well</em>, in the long term, we should get good spans from borrowck</p>



<a name="127276417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276417">(May 29 2018 at 21:55)</a>:</h4>
<p>but this is that case I was tlaking about</p>



<a name="127276419"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276419" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276419">(May 29 2018 at 21:55)</a>:</h4>
<p>where regionck today reports an error</p>



<a name="127276422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276422">(May 29 2018 at 21:55)</a>:</h4>
<p>that NLL ought to accept</p>



<a name="127276432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276432">(May 29 2018 at 21:55)</a>:</h4>
<p>I am not sure whether we want to "silence" those in this brave new future or what</p>



<a name="127276434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276434">(May 29 2018 at 21:55)</a>:</h4>
<p>maybe we do</p>



<a name="127276438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276438">(May 29 2018 at 21:55)</a>:</h4>
<p>just like we silence AST borrowck</p>



<a name="127276501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276501">(May 29 2018 at 21:56)</a>:</h4>
<p>/me pops his mental stack a few frames</p>



<a name="127276512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276512">(May 29 2018 at 21:57)</a>:</h4>
<p>The overarching thing I'm trying to figure out right now</p>



<a name="127276516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276516">(May 29 2018 at 21:57)</a>:</h4>
<p>is how many bugs that I'm about to file</p>



<a name="127276531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276531">(May 29 2018 at 21:57)</a>:</h4>
<p>are actually instances of "this needs to be fixed by producing better explanations for how our region constraints arose"</p>



<a name="127276575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276575">(May 29 2018 at 21:58)</a>:</h4>
<p>A concrete example is: <a href="https://github.com/rust-lang/rust/blob/master/src/test/ui/in-band-lifetimes/impl/dyn-trait.stderr" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/test/ui/in-band-lifetimes/impl/dyn-trait.stderr">https://github.com/rust-lang/rust/blob/master/src/test/ui/in-band-lifetimes/impl/dyn-trait.stderr</a></p>



<a name="127276587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276587">(May 29 2018 at 21:58)</a>:</h4>
<p>where AST-borrowck produces a readable series of lines explaining the constraints that led us to require <code>'a</code> to outlive <code>'static</code></p>



<a name="127276599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276599">(May 29 2018 at 21:59)</a>:</h4>
<blockquote>
<p>readable</p>
</blockquote>
<p>maybe... but better than NLL I suppose :)</p>



<a name="127276600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276600">(May 29 2018 at 21:59)</a>:</h4>
<p>but NLL just says "<code>'a needs to outlive </code>'static`", and doesn't say <em>why</em></p>



<a name="127276610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276610">(May 29 2018 at 21:59)</a>:</h4>
<p>I don't quite understand the question</p>



<a name="127276611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276611">(May 29 2018 at 21:59)</a>:</h4>
<p>(Yeah I debated about how to phrase that)</p>



<a name="127276616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276616">(May 29 2018 at 21:59)</a>:</h4>
<p>I guess you are saying: Is this something we have to fix, or could we rely on the old errors here?</p>



<a name="127276617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276617">(May 29 2018 at 21:59)</a>:</h4>
<p>(in terms of whether to assert readability or not)</p>



<a name="127276671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276671">(May 29 2018 at 22:00)</a>:</h4>
<blockquote>
<p>I guess you are saying: Is this something we have to fix, or could we rely on the old errors here?</p>
</blockquote>
<p>Well, I haven't even gotten that far in my thinking.</p>



<a name="127276684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276684">(May 29 2018 at 22:00)</a>:</h4>
<p>I'm honestly just trying to create a github issue</p>



<a name="127276697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276697">(May 29 2018 at 22:00)</a>:</h4>
<p>but I wasn't sure whether I should be looking for a pre-existing one</p>



<a name="127276702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276702">(May 29 2018 at 22:00)</a>:</h4>
<p>Or rather, I tried looking for a pre-existing one</p>



<a name="127276711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276711">(May 29 2018 at 22:01)</a>:</h4>
<p>but none of the search terms I thought would yield results (like "regionck") actually did</p>



<a name="127276716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276716">(May 29 2018 at 22:01)</a>:</h4>
<p>I think that sort of falls under <span class="user-mention" data-user-id="116106">@Reed Koser</span>'s "ungreat" issue?</p>



<a name="127276722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276722">(May 29 2018 at 22:01)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/49397" target="_blank" title="https://github.com/rust-lang/rust/issues/49397">https://github.com/rust-lang/rust/issues/49397</a></p>



<a name="127276724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276724">(May 29 2018 at 22:01)</a>:</h4>
<p>(I am thinking it's probably time for us/me to do some diagnostic sprinting, though)</p>



<a name="127276729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276729">(May 29 2018 at 22:01)</a>:</h4>
<p>the problem is that <span class="user-mention" data-user-id="116106">@Reed Koser</span> 's issue there has multiple ungreat things</p>



<a name="127276732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276732">(May 29 2018 at 22:01)</a>:</h4>
<p>there's the fact that it uses the empty string</p>



<a name="127276734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276734">(May 29 2018 at 22:02)</a>:</h4>
<p>true</p>



<a name="127276777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276777">(May 29 2018 at 22:02)</a>:</h4>
<p>but I think they're all kinda related</p>



<a name="127276786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276786">(May 29 2018 at 22:02)</a>:</h4>
<p>Well, you have more experience than I do writing tutorial instructions</p>



<a name="127276787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276787">(May 29 2018 at 22:02)</a>:</h4>
<p>I was assuming that it was better</p>



<a name="127276789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276789">(May 29 2018 at 22:02)</a>:</h4>
<p>if the issue were more targetted</p>



<a name="127276795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276795">(May 29 2018 at 22:03)</a>:</h4>
<p>problems like "present something better than an empty string for this region"</p>



<a name="127276799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276799">(May 29 2018 at 22:03)</a>:</h4>
<p>are in my mind separate from</p>



<a name="127276804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276804">(May 29 2018 at 22:03)</a>:</h4>
<p>well partly it's beacuse I don't expect to be able to mentor this one out :)</p>



<a name="127276805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276805">(May 29 2018 at 22:03)</a>:</h4>
<p>"present the series of constraints that cause us to relate these two lifetimes"</p>



<a name="127276808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276808">(May 29 2018 at 22:03)</a>:</h4>
<p>heh</p>



<a name="127276813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276813">(May 29 2018 at 22:03)</a>:</h4>
<p>So that may be getting at something</p>



<a name="127276818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276818">(May 29 2018 at 22:03)</a>:</h4>
<p>I think in your head, you know something fundamental that needs to change</p>



<a name="127276856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276856">(May 29 2018 at 22:04)</a>:</h4>
<p>in order to even provide the infrastructure that we will need</p>



<a name="127276861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276861">(May 29 2018 at 22:04)</a>:</h4>
<p>to produce useful diagnsotics</p>



<a name="127276865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276865">(May 29 2018 at 22:04)</a>:</h4>
<p>in my head, even after that fundemental change is made</p>



<a name="127276867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276867">(May 29 2018 at 22:04)</a>:</h4>
<p>there is still plumbing that will need to be done</p>



<a name="127276880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276880">(May 29 2018 at 22:05)</a>:</h4>
<p>I think we actually probably have the info</p>



<a name="127276882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276882">(May 29 2018 at 22:05)</a>:</h4>
<p>So I was wondering if we could separate the fundamental kernel  from the plumbing that hooks that kernel up to all the diagnsotics</p>



<a name="127276889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276889">(May 29 2018 at 22:05)</a>:</h4>
<p>that is, we have the full set of constraints etc</p>



<a name="127276891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276891">(May 29 2018 at 22:05)</a>:</h4>
<p>though we don't have quite as many details as the old code</p>



<a name="127276897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276897">(May 29 2018 at 22:05)</a>:</h4>
<p>that is, we don't have "causes"</p>



<a name="127276903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276903">(May 29 2018 at 22:05)</a>:</h4>
<p>just the set of constraints</p>



<a name="127276906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276906">(May 29 2018 at 22:05)</a>:</h4>
<p>(I'm not entirely convinced the old causes were good though)</p>



<a name="127276909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276909">(May 29 2018 at 22:05)</a>:</h4>
<p>(which is why I didn't recreate them)</p>



<a name="127276910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276910">(May 29 2018 at 22:06)</a>:</h4>
<p>but yes, you're probably right re: plumbing</p>



<a name="127276949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276949">(May 29 2018 at 22:06)</a>:</h4>
<p>I sort of expected for this case to just have to "play around" with various examples</p>



<a name="127276952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276952">(May 29 2018 at 22:06)</a>:</h4>
<p>maybe I'm being too much of a perfectionist</p>



<a name="127276954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276954">(May 29 2018 at 22:06)</a>:</h4>
<p>Okay so that may be a question we need to resolve: Are causes a must-have for deploying NLL</p>



<a name="127276959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276959">(May 29 2018 at 22:06)</a>:</h4>
<p>and we should try to reproduce the old "egads I need a pager" style errors</p>



<a name="127276975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276975">(May 29 2018 at 22:07)</a>:</h4>
<p>I assume you would agree that this is not acceptable in the long term: <a href="https://github.com/rust-lang/rust/blob/master/src/test/ui/in-band-lifetimes/impl/dyn-trait.nll.stderr" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/test/ui/in-band-lifetimes/impl/dyn-trait.nll.stderr">https://github.com/rust-lang/rust/blob/master/src/test/ui/in-band-lifetimes/impl/dyn-trait.nll.stderr</a></p>



<a name="127276978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276978">(May 29 2018 at 22:07)</a>:</h4>
<p>clearly not</p>



<a name="127276985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276985">(May 29 2018 at 22:07)</a>:</h4>
<p>would you then interpret that as at least evidence that we need causes?</p>



<a name="127276990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276990">(May 29 2018 at 22:07)</a>:</h4>
<p>or do you expect that there is some way to usefully present the constraints?</p>



<a name="127276992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276992">(May 29 2018 at 22:08)</a>:</h4>
<p>I suspect we need some form of causes, yes</p>



<a name="127276993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127276993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127276993">(May 29 2018 at 22:08)</a>:</h4>
<p>in a way that the user would be able to take action?</p>



<a name="127277004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127277004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127277004">(May 29 2018 at 22:08)</a>:</h4>
<p>okay</p>



<a name="127277041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127277041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127277041">(May 29 2018 at 22:08)</a>:</h4>
<p>but I sort of want to drive the causes from the errors we want to make</p>



<a name="127277044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127277044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127277044">(May 29 2018 at 22:08)</a>:</h4>
<p>I'm going to just say "NLL needs causes" for the issue I file in association with this entry in the stderr-deviations Paper then</p>



<a name="127277228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127277228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127277228">(May 29 2018 at 22:13)</a>:</h4>
<p>I'm willing to work on diagnostics stuff if that's what needs to be done. I have a branch lying around somewhere that sort-of fixed the problems, but the code was pretty gross and the output ended up more verbose than I'd like</p>



<a name="127277271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127277271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127277271">(May 29 2018 at 22:14)</a>:</h4>
<p>*the problems = the specific case the "ungreat" issue was targetting</p>



<a name="127277373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127277373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127277373">(May 29 2018 at 22:16)</a>:</h4>
<p>I haven't had a chance to take a look at the diagnostics triage doc yet. I've been pretty busy for the last couple weeks and that doesn't seem like it'll significantly lighten up any time soon</p>



<a name="127277379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127277379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127277379">(May 29 2018 at 22:17)</a>:</h4>
<p>hopefully I'll be able to find a few hours a week to hack on this stuff though</p>



<a name="127280409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127280409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127280409">(May 29 2018 at 23:38)</a>:</h4>
<p>okay I just finished a review of all the cases in <a href="https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa" target="_blank" title="https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa">https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa</a> that were updated by PR #51025</p>



<a name="127280412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127280412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127280412">(May 29 2018 at 23:38)</a>:</h4>
<p>almost all of the rows labelled "weak test" are now "100!" instead</p>



<a name="127280418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127280418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127280418">(May 29 2018 at 23:39)</a>:</h4>
<p>the only exceptions are: 1. some weak tests that were unrelated to #51025</p>



<a name="127280424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127280424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127280424">(May 29 2018 at 23:39)</a>:</h4>
<p>and 2. <a href="https://github.com/rust-lang/rust/blob/master/src/test/ui/span/borrowck-let-suggestion-suffixes.nll.stderr" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/test/ui/span/borrowck-let-suggestion-suffixes.nll.stderr">https://github.com/rust-lang/rust/blob/master/src/test/ui/span/borrowck-let-suggestion-suffixes.nll.stderr</a></p>



<a name="127280475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127280475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127280475">(May 29 2018 at 23:40)</a>:</h4>
<p>the latter I think is still a little weak. In NLL it reports 3 errors while AST-borrowck reports 4 errors, and I <em>think</em> this is because the test is not doing a good enough job of poking the dropck</p>



<a name="127280491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127280491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127280491">(May 29 2018 at 23:41)</a>:</h4>
<p>oh, yeah: What prompted this review is that I think I have finished tagging all of the non-"meh" rows with github issues</p>



<a name="127280541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127280541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127280541">(May 29 2018 at 23:42)</a>:</h4>
<p>which means we can probably retire <a href="https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa" target="_blank" title="https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa">https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa</a> itself at any time that we decide its not pulling its weight anymore</p>



<a name="127280547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127280547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127280547">(May 29 2018 at 23:42)</a>:</h4>
<p>(for now it is kind of fun to at least scroll through it and see how many cases are now tagged as <span class="emoji emoji-1f4af" title="hundred points">:hundred_points:</span> )</p>



<a name="127357075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127357075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127357075">(May 31 2018 at 11:17)</a>:</h4>
<p>/me suddenly realized that an actual spreadsheet may have been much better than a Paper doc for NLL-stderr-diagnostic-deviations</p>



<a name="127357146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127357146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127357146">(May 31 2018 at 11:19)</a>:</h4>
<p>luckily cut-and-paste into a google sheet seems like it actually ... works... (even preserves urls amazingly)</p>



<a name="127360440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360440">(May 31 2018 at 12:51)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> link?</p>



<a name="127360489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360489">(May 31 2018 at 12:52)</a>:</h4>
<p><a href="https://docs.google.com/spreadsheets/d/16Hoy5CASZOYkjZO0p85xrUberY2PnxeAHqxlT4VFurM/edit?usp=sharing" target="_blank" title="https://docs.google.com/spreadsheets/d/16Hoy5CASZOYkjZO0p85xrUberY2PnxeAHqxlT4VFurM/edit?usp=sharing">https://docs.google.com/spreadsheets/d/16Hoy5CASZOYkjZO0p85xrUberY2PnxeAHqxlT4VFurM/edit?usp=sharing</a></p>



<a name="127360494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360494">(May 31 2018 at 12:53)</a>:</h4>
<p>its not meant to be permanent though</p>



<a name="127360498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360498">(May 31 2018 at 12:53)</a>:</h4>
<p>can each of these "channels" which I see are called topics have a topic like on IRC or a description</p>



<a name="127360504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360504">(May 31 2018 at 12:53)</a>:</h4>
<p>#diagnostics and all these threads are called topics</p>



<a name="127360510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360510">(May 31 2018 at 12:53)</a>:</h4>
<p>so my guess is that is not possible</p>



<a name="127360517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360517">(May 31 2018 at 12:53)</a>:</h4>
<p>I just wanted to sort it by the issue number to ease creating a summary table at the bottom of the NLL stderr deviations Paper</p>



<a name="127360521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360521">(May 31 2018 at 12:53)</a>:</h4>
<p>could be nice to be able to put this spreadsheet in the thread description</p>



<a name="127360531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360531">(May 31 2018 at 12:54)</a>:</h4>
<p>let me note again: Its not meant to be permanent</p>



<a name="127360567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360567">(May 31 2018 at 12:54)</a>:</h4>
<p>just a sketch area</p>



<a name="127360570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360570">(May 31 2018 at 12:54)</a>:</h4>
<blockquote>
<p>I just wanted to sort it by the issue number to ease creating a summary table at the bottom of the NLL stderr deviations Paper</p>
</blockquote>
<p><span class="emoji emoji-1f44d" title="+1">:+1:</span></p>



<a name="127360603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360603">(May 31 2018 at 12:55)</a>:</h4>
<p>(though I do admit that if I put more effort into my spreadsheet-fu, I'd be able to make something that automatically generated the counts in that table)</p>



<a name="127360757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360757">(May 31 2018 at 12:58)</a>:</h4>
<p>:)</p>



<a name="127360763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360763">(May 31 2018 at 12:58)</a>:</h4>
<p>columns are a bit tight (if that's the right way to say what I'm thinking)</p>



<a name="127360772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360772">(May 31 2018 at 12:58)</a>:</h4>
<p>some text doesn't fit and it's a bit harder to read it</p>



<a name="127360903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127360903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127360903">(May 31 2018 at 13:01)</a>:</h4>
<p>/me considers deleting the spreadsheet now that he's done with it</p>



<a name="127361523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127361523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127361523">(May 31 2018 at 13:17)</a>:</h4>
<p>ahh ok :)</p>



<a name="127361530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127361530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127361530">(May 31 2018 at 13:17)</a>:</h4>
<p>I'm not using it just wanted to take a look</p>



<a name="127361535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127361535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127361535">(May 31 2018 at 13:17)</a>:</h4>
<p>so don't worry about me</p>



<a name="127361574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127361574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127361574">(May 31 2018 at 13:18)</a>:</h4>
<p>I still need to start with my diagnostics issue</p>



<a name="127361578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127361578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127361578">(May 31 2018 at 13:18)</a>:</h4>
<p>and it's clear what's going on</p>



<a name="127363526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127363526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127363526">(May 31 2018 at 14:04)</a>:</h4>
<blockquote>
<p>let me note again: Its not meant to be permanent</p>
</blockquote>
<p>why?</p>



<a name="127363532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127363532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127363532">(May 31 2018 at 14:04)</a>:</h4>
<p>that is, <span class="user-mention" data-user-id="116083">@pnkfelix</span>, why would we not have a spreadsheet that we aim to keep up to date?</p>



<a name="127363537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127363537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127363537">(May 31 2018 at 14:05)</a>:</h4>
<p>it's maybe useful to have correlations in both ways I think</p>



<a name="127363548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127363548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127363548">(May 31 2018 at 14:05)</a>:</h4>
<p>we can. but that was not the purpose of <em>that</em> sheet</p>



<a name="127363553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127363553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127363553">(May 31 2018 at 14:05)</a>:</h4>
<p>or maybe it's too much work, not sure</p>



<a name="127363554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127363554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127363554">(May 31 2018 at 14:05)</a>:</h4>
<p>ok</p>



<a name="127363570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127363570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127363570">(May 31 2018 at 14:05)</a>:</h4>
<p>(it could well be repurposed for such. I just saw <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> 's feedback and thought "I dont want to worry about this right now)</p>



<a name="127365250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127365250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127365250">(May 31 2018 at 14:37)</a>:</h4>
<p>hehe don't worry about my feedback, I can just deal with the way it is :)</p>



<a name="127365302"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127365302" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127365302">(May 31 2018 at 14:38)</a>:</h4>
<p>I just needed to increase cells span a bit</p>



<a name="127365310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127365310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127365310">(May 31 2018 at 14:38)</a>:</h4>
<p>but don't worry about that</p>



<a name="127365319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127365319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127365319">(May 31 2018 at 14:38)</a>:</h4>
<p>I'm not using the spreadsheet</p>



<a name="127376963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127376963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127376963">(May 31 2018 at 18:42)</a>:</h4>
<p>I was starting to go over <a href="https://github.com/rust-lang/rust/issues/51031" target="_blank" title="https://github.com/rust-lang/rust/issues/51031">https://github.com/rust-lang/rust/issues/51031</a></p>



<a name="127376982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127376982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127376982">(May 31 2018 at 18:43)</a>:</h4>
<p>told Niko that I'm going to try to investigate a bit more about structures involved there because I use to forget or not know what are most of the structures that we use around</p>



<a name="127376984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127376984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127376984">(May 31 2018 at 18:43)</a>:</h4>
<p>great I'll put your name in there</p>



<a name="127376994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127376994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127376994">(May 31 2018 at 18:43)</a>:</h4>
<p>(on the table I've put at the bottom of the paper doc.)</p>



<a name="127376998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127376998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127376998">(May 31 2018 at 18:43)</a>:</h4>
<p>like in that example Context, (Place, Span), Flows, etc</p>



<a name="127377003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377003">(May 31 2018 at 18:43)</a>:</h4>
<p>((you know, that paper doc that we <em>also</em> didn't want to become a canonical Database. :)  ))</p>



<a name="127377007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377007">(May 31 2018 at 18:43)</a>:</h4>
<p>so many things :), going to keep saying stuff and asking questions here</p>



<a name="127377051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377051">(May 31 2018 at 18:44)</a>:</h4>
<blockquote>
<p>great I'll put your name in there</p>
</blockquote>
<p><span class="emoji emoji-1f44d" title="+1">:+1:</span></p>



<a name="127377052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377052">(May 31 2018 at 18:44)</a>:</h4>
<p>Okay. For once I actually know what all four of those things are</p>



<a name="127377059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377059">(May 31 2018 at 18:44)</a>:</h4>
<p>so ...</p>



<a name="127377076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377076">(May 31 2018 at 18:44)</a>:</h4>
<p>Context is a Location wrapper that hols a ContextKind which says what's going on in that Location</p>



<a name="127377078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377078">(May 31 2018 at 18:44)</a>:</h4>
<p>you can correct me</p>



<a name="127377094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377094">(May 31 2018 at 18:45)</a>:</h4>
<p>will try to build an NLL data types Glossary</p>



<a name="127377110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377110">(May 31 2018 at 18:45)</a>:</h4>
<p>yes that's right. My memory/intent was that <code>Context</code> would only be used for <del>debugging</del> compiler instrumentation info</p>



<a name="127377162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377162">(May 31 2018 at 18:46)</a>:</h4>
<p>as in, knowing the context of a call in a bit of <code>debug!</code> output</p>



<a name="127377163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377163">(May 31 2018 at 18:46)</a>:</h4>
<p>ok, btw, one weird thing is that <a href="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1375-L1380" target="_blank" title="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1375-L1380">https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1375-L1380</a> is receiving the Context</p>



<a name="127377169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377169">(May 31 2018 at 18:46)</a>:</h4>
<p>to pass it in here <a href="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1395" target="_blank" title="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1395">https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1395</a></p>



<a name="127377211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377211">(May 31 2018 at 18:47)</a>:</h4>
<p>and then that's discarded here <a href="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/error_reporting.rs#L598" target="_blank" title="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/error_reporting.rs#L598">https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/error_reporting.rs#L598</a></p>



<a name="127377214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377214">(May 31 2018 at 18:47)</a>:</h4>
<p>yeah the Context is not a full call chain</p>



<a name="127377220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377220">(May 31 2018 at 18:47)</a>:</h4>
<p>it just reports what part of the MIR we were in when we reached that point</p>



<a name="127377222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377222">(May 31 2018 at 18:47)</a>:</h4>
<p>I guess this is to avoid breaking the API</p>



<a name="127377280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377280">(May 31 2018 at 18:48)</a>:</h4>
<p>at some point we should be able to discard <code>Context</code> entirely,  I think/hope, as long as no one has put in code that actually inspects them</p>



<a name="127377297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377297">(May 31 2018 at 18:48)</a>:</h4>
<p>I have seen this happen in several parts of the code</p>



<a name="127377304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377304">(May 31 2018 at 18:48)</a>:</h4>
<p>that is, the only thing that should be reading the <code>context</code> is the <code>debug!</code> calls</p>



<a name="127377306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377306">(May 31 2018 at 18:48)</a>:</h4>
<p>couldn't be nice to use _context there?</p>



<a name="127377317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377317">(May 31 2018 at 18:49)</a>:</h4>
<p>I mean, even when used</p>



<a name="127377322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377322">(May 31 2018 at 18:49)</a>:</h4>
<p>you mean name it <code>_context</code> just to make it clear that no one should be reading from it?</p>



<a name="127377323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377323">(May 31 2018 at 18:49)</a>:</h4>
<p>because you use it to pass it to a function that doesn't use it</p>



<a name="127377411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377411">(May 31 2018 at 18:50)</a>:</h4>
<p>oh I guess some code is reading the <code>context.loc</code> for the purpose of identifying spans</p>



<a name="127377424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377424">(May 31 2018 at 18:50)</a>:</h4>
<p>that was not my intent, but we can always replace <code>context</code> with just the <code>loc</code> in the future.</p>



<a name="127377440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377440">(May 31 2018 at 18:51)</a>:</h4>
<p>I'm not sure I follow you</p>



<a name="127377454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377454">(May 31 2018 at 18:51)</a>:</h4>
<p>all I'm saying is that in check_if_reassignment_to_immutable_state context is just used to pass it to report_illegal_reassignment</p>



<a name="127377462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377462">(May 31 2018 at 18:52)</a>:</h4>
<p>sure</p>



<a name="127377503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377503">(May 31 2018 at 18:52)</a>:</h4>
<p>but in report_illegal_reassignment context is _context which is just discarded</p>



<a name="127377520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377520">(May 31 2018 at 18:52)</a>:</h4>
<p>I'm saying that my <em>intent</em> was that everywhere in the code, the <code>context</code> argument would not have any effect on the compiler's behavior</p>



<a name="127377521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377521">(May 31 2018 at 18:52)</a>:</h4>
<p>so I'm saying why don't we use _context in check_if_reassignment_to_immutable_state and pass it to the other function as _context too, kind of in a way to describe that the thing is not used</p>



<a name="127377526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377526">(May 31 2018 at 18:52)</a>:</h4>
<p>otherwise just remove from the signature</p>



<a name="127377530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377530">(May 31 2018 at 18:52)</a>:</h4>
<p>I have no problem with the idea of naming it <code>_context</code></p>



<a name="127377533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377533">(May 31 2018 at 18:53)</a>:</h4>
<p>but I guess that breaks stuff</p>



<a name="127377542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377542">(May 31 2018 at 18:53)</a>:</h4>
<p>but I do not want it removed from the sginature</p>



<a name="127377546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377546">(May 31 2018 at 18:53)</a>:</h4>
<p>because I find it useful when adding <code>debug!</code> statemnets</p>



<a name="127377553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377553">(May 31 2018 at 18:53)</a>:</h4>
<p>such as here: <a href="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/error_reporting.rs#L560" target="_blank" title="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/error_reporting.rs#L560">https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/error_reporting.rs#L560</a></p>



<a name="127377559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377559">(May 31 2018 at 18:53)</a>:</h4>
<p>I understand</p>



<a name="127377571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377571">(May 31 2018 at 18:53)</a>:</h4>
<p>not every method has such a debug! statement, but I will sometimes throw them in temporarily</p>



<a name="127377572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377572">(May 31 2018 at 18:53)</a>:</h4>
<p>you want it there so you can add debug! calls when you're coding?</p>



<a name="127377574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377574">(May 31 2018 at 18:53)</a>:</h4>
<p>exactly</p>



<a name="127377577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377577">(May 31 2018 at 18:53)</a>:</h4>
<p><span class="emoji emoji-1f44d" title="+1">:+1:</span></p>



<a name="127377578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377578">(May 31 2018 at 18:54)</a>:</h4>
<p>and its a lot more effort to rethread the <code>context</code> through everything</p>



<a name="127377615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377615">(May 31 2018 at 18:54)</a>:</h4>
<p>that's what I wanted to know :)</p>



<a name="127377617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377617">(May 31 2018 at 18:54)</a>:</h4>
<p>so I prefer to keep it</p>



<a name="127377623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377623">(May 31 2018 at 18:54)</a>:</h4>
<p>makes sense</p>



<a name="127377625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377625">(May 31 2018 at 18:54)</a>:</h4>
<p>but I don't mind naming it <code>_context</code>.</p>



<a name="127377629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377629">(May 31 2018 at 18:54)</a>:</h4>
<p>was just trying to understand</p>



<a name="127377637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377637">(May 31 2018 at 18:54)</a>:</h4>
<p>I <em>do</em> think we should probably change this code: <a href="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/error_reporting.rs#L269" target="_blank" title="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/error_reporting.rs#L269">https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/error_reporting.rs#L269</a></p>



<a name="127377640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377640">(May 31 2018 at 18:54)</a>:</h4>
<p>to not read from <code>context.loc</code></p>



<a name="127377642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377642">(May 31 2018 at 18:54)</a>:</h4>
<p>it may be useful for this kind of things to name it _context to explain that is just for debug purposes or something like that</p>



<a name="127377643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377643">(May 31 2018 at 18:54)</a>:</h4>
<p>but ... its a nitpick</p>



<a name="127377669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377669">(May 31 2018 at 18:55)</a>:</h4>
<p>you mean, not read from context.loc and pass the loc to the funcion?</p>



<a name="127377672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377672">(May 31 2018 at 18:55)</a>:</h4>
<p>yeah that's what I was thinking</p>



<a name="127377675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377675">(May 31 2018 at 18:55)</a>:</h4>
<p>but its a really minor detail</p>



<a name="127377677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377677">(May 31 2018 at 18:55)</a>:</h4>
<p><span class="emoji emoji-1f44d" title="+1">:+1:</span></p>



<a name="127377679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377679">(May 31 2018 at 18:55)</a>:</h4>
<p>yes</p>



<a name="127377680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377680">(May 31 2018 at 18:55)</a>:</h4>
<p>I see</p>



<a name="127377681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377681">(May 31 2018 at 18:55)</a>:</h4>
<p>and we have bigger fish to fry at the moment</p>



<a name="127377687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377687">(May 31 2018 at 18:55)</a>:</h4>
<p>thanks, it helps understanding</p>



<a name="127377692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377692">(May 31 2018 at 18:55)</a>:</h4>
<p>yeah, I'm not going to do that</p>



<a name="127377739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377739">(May 31 2018 at 18:56)</a>:</h4>
<p>just asking to get some understanding of these structs involved</p>



<a name="127377778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377778">(May 31 2018 at 18:57)</a>:</h4>
<p>then Place is described like</p>



<a name="127377785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377785">(May 31 2018 at 18:57)</a>:</h4>
<div class="codehilite"><pre><span></span>/// A path to a value; something that can be evaluated without
/// changing or disturbing program state.
</pre></div>



<a name="127377848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377848">(May 31 2018 at 18:58)</a>:</h4>
<p>I thought more about Place as place in memory</p>



<a name="127377861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377861">(May 31 2018 at 18:58)</a>:</h4>
<p>where values are stored</p>



<a name="127377872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377872">(May 31 2018 at 18:58)</a>:</h4>
<blockquote>
<p>at some point we should be able to discard <code>Context</code> entirely,  I think/hope, as long as no one has put in code that actually inspects them</p>
</blockquote>
<p>what is wrong with having a context?</p>



<a name="127377885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377885">(May 31 2018 at 18:58)</a>:</h4>
<p>in particular polonius integration uses it I think ;)</p>



<a name="127377897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377897">(May 31 2018 at 18:59)</a>:</h4>
<p>it uses it to get the location</p>



<a name="127377912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377912">(May 31 2018 at 18:59)</a>:</h4>
<p>(I guess I don't know why it's an important invariant that <code>context</code> doesn't affect behavior)</p>



<a name="127377921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377921">(May 31 2018 at 18:59)</a>:</h4>
<p>mm</p>



<a name="127377928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377928">(May 31 2018 at 18:59)</a>:</h4>
<p>I guess it doesn't matter</p>



<a name="127377998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127377998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127377998">(May 31 2018 at 19:00)</a>:</h4>
<p>otoh threading an explicit location also seems ok — or even baking it into the flows</p>



<a name="127378003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127378003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127378003">(May 31 2018 at 19:00)</a>:</h4>
<p>most of the code kind of "implicitly knows" where it is</p>



<a name="127378006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127378006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127378006">(May 31 2018 at 19:00)</a>:</h4>
<p>via the <code>flows</code> state</p>



<a name="127378010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127378010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127378010">(May 31 2018 at 19:00)</a>:</h4>
<p>or at least implicitly knows the state of the various bitsets at the point where it is</p>



<a name="127378011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127378011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127378011">(May 31 2018 at 19:00)</a>:</h4>
<p>just once you start reading structure of <code>context,</code> then you have to actually commit to its form to some degree</p>



<a name="127378043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127378043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127378043">(May 31 2018 at 19:01)</a>:</h4>
<p>but if all you are using it for is as a token with useful <code>fmt::Debug</code> output ...</p>



<a name="127378052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127378052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127378052">(May 31 2018 at 19:01)</a>:</h4>
<p>then that leaves the developer with more freedom for what does or doesn't go in it.</p>



<a name="127378061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127378061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127378061">(May 31 2018 at 19:01)</a>:</h4>
<p>But really, I don't actually have much justification.</p>



<a name="127378122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127378122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127378122">(May 31 2018 at 19:02)</a>:</h4>
<p>Attaching the location to the <code>flows</code> state ... that would indeed be interesting...</p>



<a name="127378209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127378209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127378209">(May 31 2018 at 19:04)</a>:</h4>
<blockquote>
<p>I thought more about Place as place in memory<br>
where values are stored</p>
</blockquote>
<p>is this correct?</p>



<a name="127378246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127378246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127378246">(May 31 2018 at 19:05)</a>:</h4>
<p>confused because</p>



<a name="127378249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127378249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127378249">(May 31 2018 at 19:05)</a>:</h4>
<div class="codehilite"><pre><span></span>#[derive(Copy, Clone, Debug)]
pub enum Place {
    /// A place referring to a value allocated in the `Memory` system.
    Ptr {
        /// A place may have an invalid (integral or undef) pointer,
        /// since it might be turned back into a reference
        /// before ever being dereferenced.
        ptr: Scalar,
        align: Align,
        extra: PlaceExtra,
    },

    /// A place referring to a value on the stack. Represented by a stack frame index paired with
    /// a Mir local index.
    Local { frame: usize, local: mir::Local },
}
</pre></div>



<a name="127378299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127378299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127378299">(May 31 2018 at 19:06)</a>:</h4>
<div class="codehilite"><pre><span></span>/// A path to a value; something that can be evaluated without
/// changing or disturbing program state.
#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable)]
pub enum Place&lt;&#39;tcx&gt; {
    /// local variable
    Local(Local),

    /// static or static mut variable
    Static(Box&lt;Static&lt;&#39;tcx&gt;&gt;),

    /// projection out of a place (access a field, deref a pointer, etc)
    Projection(Box&lt;PlaceProjection&lt;&#39;tcx&gt;&gt;),
}
</pre></div>



<a name="127378312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127378312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127378312">(May 31 2018 at 19:06)</a>:</h4>
<p>I was looking at the second one</p>



<a name="127380673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127380673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127380673">(May 31 2018 at 20:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> you around?</p>



<a name="127380746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127380746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127380746">(May 31 2018 at 20:06)</a>:</h4>
<p>sort of</p>



<a name="127380747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127380747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127380747">(May 31 2018 at 20:06)</a>:</h4>
<p>in a meeting</p>



<a name="127380751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127380751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127380751">(May 31 2018 at 20:06)</a>:</h4>
<p>but it hasn't started yet :)</p>



<a name="127380767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127380767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127380767">(May 31 2018 at 20:07)</a>:</h4>
<p>what I 'm understanding from your comment here <a href="https://github.com/rust-lang/rust/issues/51031" target="_blank" title="https://github.com/rust-lang/rust/issues/51031">https://github.com/rust-lang/rust/issues/51031</a> about <code>report_illegal_reassignment</code> is that I needed to call that, but that thing doesn't report the <code>consider using a mut thing</code>.<code>check_access_permissions</code> is the one that does but unsure how do they play together if shouldn't</p>



<a name="127380956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127380956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127380956">(May 31 2018 at 20:10)</a>:</h4>
<p>I'm adding some code to call it and see what happens, compile times killing me</p>



<a name="127380957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127380957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127380957">(May 31 2018 at 20:10)</a>:</h4>
<p>:(</p>



<a name="127380973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127380973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127380973">(May 31 2018 at 20:11)</a>:</h4>
<p>mm let me check</p>



<a name="127380978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127380978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127380978">(May 31 2018 at 20:11)</a>:</h4>
<p>I think that makes the thing</p>



<a name="127380984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127380984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127380984">(May 31 2018 at 20:11)</a>:</h4>
<p>but I'm getting cannot mutate suggestion</p>



<a name="127380987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127380987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127380987">(May 31 2018 at 20:11)</a>:</h4>
<p>I'm probably passing the wrong stuff</p>



<a name="127380989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127380989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127380989">(May 31 2018 at 20:11)</a>:</h4>
<p>checking</p>



<a name="127381048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381048">(May 31 2018 at 20:12)</a>:</h4>
<p>I may have been confused</p>



<a name="127381069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381069">(May 31 2018 at 20:13)</a>:</h4>
<p>the Place need to be a projection with base Local</p>



<a name="127381072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381072">(May 31 2018 at 20:13)</a>:</h4>
<p>for this error to show up</p>



<a name="127381204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381204">(May 31 2018 at 20:16)</a>:</h4>
<p>I'm not sure about that case, seems like the fix it's not just calling a function, I can just build that thing up and call it a day</p>



<a name="127381310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381310">(May 31 2018 at 20:19)</a>:</h4>
<p>ok <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> here now</p>



<a name="127381364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381364">(May 31 2018 at 20:20)</a>:</h4>
<p>btw did you ever try gdb?</p>



<a name="127381372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381372">(May 31 2018 at 20:20)</a>:</h4>
<p>hmm so there is <a href="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1708-L1709" target="_blank" title="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1708-L1709">this code already</a></p>



<a name="127381388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381388">(May 31 2018 at 20:21)</a>:</h4>
<p>though it doesn't appear to be executing here...?</p>



<a name="127381444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381444">(May 31 2018 at 20:22)</a>:</h4>
<p>ah, I see why</p>



<a name="127381452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381452">(May 31 2018 at 20:22)</a>:</h4>
<p>are you there <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> ?</p>



<a name="127381481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381481">(May 31 2018 at 20:23)</a>:</h4>
<p>sorry read that wrong, yes here</p>



<a name="127381488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381488">(May 31 2018 at 20:23)</a>:</h4>
<p>well I was debating whether to leave revised notes here or in the issue</p>



<a name="127381492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381492">(May 31 2018 at 20:23)</a>:</h4>
<p>if you're around we can "chat live"</p>



<a name="127381504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381504">(May 31 2018 at 20:24)</a>:</h4>
<p>so it seems like we have <a href="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1708-L1709" target="_blank" title="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1708-L1709">this code already</a>, which tries to tell you "which variable is causing the path not to be mutable"</p>



<a name="127381546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381546">(May 31 2018 at 20:24)</a>:</h4>
<p>that code is sort of like a poor version of the suggestion we are trying to add</p>



<a name="127381550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381550">(May 31 2018 at 20:24)</a>:</h4>
<p>we can chat live yes</p>



<a name="127381570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381570">(May 31 2018 at 20:25)</a>:</h4>
<p>or I can try to take a look at what you're saying</p>



<a name="127381608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381608">(May 31 2018 at 20:25)</a>:</h4>
<p>so that code compares the borrowed path against the path which must be mut</p>



<a name="127381613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381613">(May 31 2018 at 20:25)</a>:</h4>
<p>and does nothing if they are the same</p>



<a name="127381617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381617">(May 31 2018 at 20:25)</a>:</h4>
<p>I'm not .. 100% sure the point of that, but I think what it <em>should do</em></p>



<a name="127381665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381665">(May 31 2018 at 20:26)</a>:</h4>
<p>is to check if this is a local, find its declaration, and issue a suggestion</p>



<a name="127381667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381667">(May 31 2018 at 20:26)</a>:</h4>
<p>much like what I wrote already</p>



<a name="127381685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381685">(May 31 2018 at 20:26)</a>:</h4>
<p>hold on a bit</p>



<a name="127381726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381726">(May 31 2018 at 20:27)</a>:</h4>
<p>(to be clear, I think we can delete the code that's there now)</p>



<a name="127381730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381730">(May 31 2018 at 20:27)</a>:</h4>
<p>(looking through <code>ui</code> tests, it doesn't seem to add much)</p>



<a name="127381742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381742">(May 31 2018 at 20:27)</a>:</h4>
<p>back</p>



<a name="127381779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381779">(May 31 2018 at 20:28)</a>:</h4>
<p>example: </p>
<div class="codehilite"><pre><span></span>error[E0594]: cannot assign to immutable item `x`
  --&gt; $DIR/issue-45983.rs:17:18
   |
LL |     give_any(|y| x = Some(y));
   |                  ^^^^^^^^^^^ cannot mutate
   |
   = note: the value which is causing this path not to be mutable is...: `x`
</pre></div>



<a name="127381783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381783">(May 31 2018 at 20:28)</a>:</h4>
<p>let me read what you've said</p>



<a name="127381811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381811">(May 31 2018 at 20:28)</a>:</h4>
<blockquote>
<p>btw did you ever try gdb?</p>
</blockquote>
<p>about gdb couldn't, I mean, I can but it takes ages to compile with <code>debug = true</code></p>



<a name="127381813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381813">(May 31 2018 at 20:29)</a>:</h4>
<p>seriously like 30 mins</p>



<a name="127381824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381824">(May 31 2018 at 20:29)</a>:</h4>
<p>k</p>



<a name="127381915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381915">(May 31 2018 at 20:30)</a>:</h4>
<p>ok read the stuff</p>



<a name="127381918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381918">(May 31 2018 at 20:30)</a>:</h4>
<p>not sure what you want to do</p>



<a name="127381924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381924">(May 31 2018 at 20:30)</a>:</h4>
<p>maybe I didn't understand something</p>



<a name="127381926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381926">(May 31 2018 at 20:30)</a>:</h4>
<p>do you want the poor version?</p>



<a name="127381927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381927">(May 31 2018 at 20:30)</a>:</h4>
<p>I do not</p>



<a name="127381928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381928">(May 31 2018 at 20:30)</a>:</h4>
<p>I want to replace it</p>



<a name="127381929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381929">(May 31 2018 at 20:31)</a>:</h4>
<p>with this new suggestion</p>



<a name="127381944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381944">(May 31 2018 at 20:31)</a>:</h4>
<p>so you meant that the stuff I need is at that place?</p>



<a name="127381953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127381953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127381953">(May 31 2018 at 20:31)</a>:</h4>
<p>I believe so, yes</p>



<a name="127382007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382007">(May 31 2018 at 20:32)</a>:</h4>
<p>the <code>place_err</code> variable is I think the "reason" for the error</p>



<a name="127382014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382014">(May 31 2018 at 20:33)</a>:</h4>
<p>but this thing is not triggering in my example if that's what you mean</p>



<a name="127382020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382020">(May 31 2018 at 20:33)</a>:</h4>
<p>that's because of the <code>if place != place_err</code></p>



<a name="127382021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382021">(May 31 2018 at 20:33)</a>:</h4>
<p>I mean, I'm not getting this poor version</p>



<a name="127382022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382022">(May 31 2018 at 20:33)</a>:</h4>
<p>we would remove that</p>



<a name="127382025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382025">(May 31 2018 at 20:33)</a>:</h4>
<p>at least, that's my theory</p>



<a name="127382027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382027">(May 31 2018 at 20:33)</a>:</h4>
<p>ahh</p>



<a name="127382028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382028">(May 31 2018 at 20:33)</a>:</h4>
<p>I see</p>



<a name="127382030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382030">(May 31 2018 at 20:33)</a>:</h4>
<p>ok</p>



<a name="127382031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382031">(May 31 2018 at 20:33)</a>:</h4>
<p>let me try to figure out with all this info</p>



<a name="127382101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382101">(May 31 2018 at 20:35)</a>:</h4>
<p>ok, I'm dumping a few notes in the issue, but maybe I should stop :)</p>



<a name="127382149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382149">(May 31 2018 at 20:36)</a>:</h4>
<p>I didn't put too many details :) <a href="https://github.com/rust-lang/rust/issues/51031#issuecomment-393671271" target="_blank" title="https://github.com/rust-lang/rust/issues/51031#issuecomment-393671271">here</a></p>



<a name="127382171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382171">(May 31 2018 at 20:37)</a>:</h4>
<p>yep</p>



<a name="127382174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382174">(May 31 2018 at 20:37)</a>:</h4>
<p>I've done all what you're suggesting</p>



<a name="127382181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382181">(May 31 2018 at 20:37)</a>:</h4>
<p>but was doing in the function we were talking about at the beginning</p>



<a name="127382225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382225">(May 31 2018 at 20:38)</a>:</h4>
<p>I'm trying removing the if to see if this thing shows up</p>



<a name="127382228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382228">(May 31 2018 at 20:38)</a>:</h4>
<p>and then will do all that</p>



<a name="127382231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382231">(May 31 2018 at 20:38)</a>:</h4>
<p>one thing that is bothering me</p>



<a name="127382237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382237">(May 31 2018 at 20:38)</a>:</h4>
<p>there are many arms to this match</p>



<a name="127382247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382247">(May 31 2018 at 20:38)</a>:</h4>
<p>eg, the <a href="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1695-L1696" target="_blank" title="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1695-L1696">one we have been looking at</a></p>



<a name="127382250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382250">(May 31 2018 at 20:38)</a>:</h4>
<p>but also <a href="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1717" target="_blank" title="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1717">this one</a></p>



<a name="127382265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382265">(May 31 2018 at 20:39)</a>:</h4>
<p>these are all reporting errors</p>



<a name="127382267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382267">(May 31 2018 at 20:39)</a>:</h4>
<p>but for different causes</p>



<a name="127382273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382273">(May 31 2018 at 20:39)</a>:</h4>
<p>e.g., we use different wording for <code>x = 3</code> vs <code>&amp;mut x</code></p>



<a name="127382274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382274">(May 31 2018 at 20:39)</a>:</h4>
<p><em>however</em></p>



<a name="127382275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382275">(May 31 2018 at 20:39)</a>:</h4>
<p>in all cases we probably want to issue the same kinds of suggestions</p>



<a name="127382282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382282">(May 31 2018 at 20:40)</a>:</h4>
<p>I feel like the setup of this method could be changed</p>



<a name="127382333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382333">(May 31 2018 at 20:40)</a>:</h4>
<p>right now, each arm fully constructs an error and invokes <code>err.emit()</code></p>



<a name="127382410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127382410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127382410">(May 31 2018 at 20:42)</a>:</h4>
<p>but I think we would rather have something like:</p>
<div class="codehilite"><pre><span></span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">err</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">match</span><span class="w"> </span><span class="n">kind</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="n">Reservation</span><span class="p">(...)</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">Write</span><span class="p">(...)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="n">no</span><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">construct_err_object</span><span class="p">()</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="n">Reservation</span><span class="p">(...)</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">Write</span><span class="p">(...)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="cm">/* some variant of the preivous arm */</span><span class="p">,</span><span class="w"></span>
<span class="w">  </span><span class="n">Reservation</span><span class="p">(...)</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">Write</span><span class="p">(...)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">...,</span><span class="w"></span>
<span class="p">};</span><span class="w"></span>

<span class="c1">// If we get here, then there *is* an error</span>
<span class="k">match</span><span class="w"> </span><span class="n">place_err</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">Place</span>::<span class="n">Local</span><span class="p">(</span><span class="n">l</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="c1">// suggest changing to `mut` variable</span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="n">Place</span>::<span class="n">Projection</span><span class="p">(...)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="c1">// suggest changing to `&amp;mut` borrow (see [link 1])</span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="n">err</span><span class="p">.</span><span class="n">emit</span><span class="p">()</span><span class="w"></span>
</pre></div>


<p><a href="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1723-L1728" target="_blank" title="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1723-L1728">link 1</a></p>



<a name="127383106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383106">(May 31 2018 at 20:54)</a>:</h4>
<p>ok, will check this as soon as I have this working</p>



<a name="127383110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383110">(May 31 2018 at 20:54)</a>:</h4>
<p>one question</p>



<a name="127383128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383128">(May 31 2018 at 20:55)</a>:</h4>
<p>why did you say source_info gives me the span?</p>



<a name="127383133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383133">(May 31 2018 at 20:55)</a>:</h4>
<p>wouldn't it be local.span?</p>



<a name="127383148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383148">(May 31 2018 at 20:56)</a>:</h4>
<p>I don't think there is any such field</p>



<a name="127383190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383190">(May 31 2018 at 20:56)</a>:</h4>
<p>but <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/struct.SourceInfo.html" target="_blank" title="https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/struct.SourceInfo.html">the <code>SourceInfo</code> struct</a> has one</p>



<a name="127383239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383239">(May 31 2018 at 20:57)</a>:</h4>
<p>so you're talking about the local_decl</p>



<a name="127383280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383280">(May 31 2018 at 20:58)</a>:</h4>
<p>I was trying to get it from the local</p>



<a name="127383288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383288">(May 31 2018 at 20:58)</a>:</h4>
<p>Place::Local(local)</p>



<a name="127383292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383292">(May 31 2018 at 20:58)</a>:</h4>
<p>that local inside has a span</p>



<a name="127383295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383295">(May 31 2018 at 20:58)</a>:</h4>
<p>now I'm confused about what's each thing</p>



<a name="127383306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383306">(May 31 2018 at 20:58)</a>:</h4>
<p>the <code>Local</code> is just an index</p>



<a name="127383310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383310">(May 31 2018 at 20:58)</a>:</h4>
<p>you can think of it as the name of the local variable</p>



<a name="127383317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383317">(May 31 2018 at 20:59)</a>:</h4>
<p>the <code>LocalDecl</code> tells you information about its declaration</p>



<a name="127383325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383325">(May 31 2018 at 20:59)</a>:</h4>
<p>so when I navigate to the Local definition I'm probably seeing something that's unrelated</p>



<a name="127383330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383330">(May 31 2018 at 20:59)</a>:</h4>
<div class="codehilite"><pre><span></span>  # pri kind tag               file
  1 F   s    Local             src/librustc/hir/mod.rs
               pub struct Local {
  2 F   s    Local             src/libsyntax/ast.rs
               pub struct Local {
</pre></div>



<a name="127383397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383397">(May 31 2018 at 21:00)</a>:</h4>
<p>those things are unrelated</p>



<a name="127383401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383401">(May 31 2018 at 21:00)</a>:</h4>
<p>that is because <code>Local</code> is an index created by the <code>newtype_index</code> macro</p>



<a name="127383404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383404">(May 31 2018 at 21:00)</a>:</h4>
<p><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/struct.Local.html" target="_blank" title="https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/struct.Local.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/struct.Local.html</a></p>



<a name="127383414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383414">(May 31 2018 at 21:01)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/50337" target="_blank" title="https://github.com/rust-lang/rust/issues/50337">https://github.com/rust-lang/rust/issues/50337</a> :)</p>



<a name="127383503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383503">(May 31 2018 at 21:03)</a>:</h4>
<p>yes that's in my todo list</p>



<a name="127383508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127383508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127383508">(May 31 2018 at 21:03)</a>:</h4>
<p>but yeah, I remember it comes from there</p>



<a name="127385398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127385398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127385398">(May 31 2018 at 21:49)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> in a local_decl, I see that name is an Option</p>



<a name="127385410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127385410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127385410">(May 31 2018 at 21:50)</a>:</h4>
<p>but if the declaration is_user_variable it should have a name, right?</p>



<a name="127385453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127385453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127385453">(May 31 2018 at 21:50)</a>:</h4>
<p>so it's safe to unwrap?</p>



<a name="127385456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127385456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127385456">(May 31 2018 at 21:50)</a>:</h4>
<p>I think that is true :)</p>



<a name="127385460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127385460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127385460">(May 31 2018 at 21:50)</a>:</h4>
<p>when can map_or anyway if you prefer</p>



<a name="127385468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127385468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127385468">(May 31 2018 at 21:51)</a>:</h4>
<p>I think the thing is working</p>



<a name="127385472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127385472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127385472">(May 31 2018 at 21:51)</a>:</h4>
<p>will check, compile times are giving me a hard time</p>



<a name="127385729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127385729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127385729">(May 31 2018 at 21:58)</a>:</h4>
<p>it does seem like a lot of stuff here might just be finding fixes to small bugs in <code>fn check_access_permissions</code></p>



<a name="127385750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127385750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127385750">(May 31 2018 at 21:59)</a>:</h4>
<p>I've been personally musing about whether it actually makes sense to be doing these checks (which seem <em>very</em> AST oriented to me) on the MIR... is there any chance this would be better off as a pass over the HAIR?</p>



<a name="127385752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127385752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127385752">(May 31 2018 at 21:59)</a>:</h4>
<div class="codehilite"><pre><span></span>[santiago@archlinux rust1 (suggest-use-mut-in-nll)]$ rustc +stage1 src/test/ui/codemap_tests/huge_multispan_highlight.rs
warning: unused variable: `y`
   --&gt; src/test/ui/codemap_tests/huge_multispan_highlight.rs:100:9
    |
100 |     let y = &amp;mut x; //~ ERROR cannot borrow
    |         ^ help: consider using `_y` instead
    |
    = note: #[warn(unused_variables)] on by default

error[E0596]: cannot borrow immutable local variable `x` as mutable
   --&gt; src/test/ui/codemap_tests/huge_multispan_highlight.rs:100:18
    |
12  |     let x = &quot;foo&quot;;
    |         - consider changing this to `mut x`
...
100 |     let y = &amp;mut x; //~ ERROR cannot borrow
    |                  ^ cannot borrow mutably

error: aborting due to previous error

For more information about this error, try `rustc --explain E0596`.
</pre></div>



<a name="127385768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127385768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127385768">(May 31 2018 at 21:59)</a>:</h4>
<p>ah excellent</p>



<a name="127385832"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127385832" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127385832">(May 31 2018 at 22:00)</a>:</h4>
<p>running tests</p>



<a name="127385834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127385834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127385834">(May 31 2018 at 22:00)</a>:</h4>
<p>and will push a PR</p>



<a name="127385990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127385990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127385990">(May 31 2018 at 22:05)</a>:</h4>
<p>I was expecting to see something failing but unsure if there's some of this cases being run in nll mode</p>



<a name="127385997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127385997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127385997">(May 31 2018 at 22:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> remember me, how was to make src/test/ui/codemap_tests/huge_multispan_highlight.rs run in both modes</p>



<a name="127386064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386064">(May 31 2018 at 22:06)</a>:</h4>
<p>everything in <code>ui/</code> should be getting tested under NLL, when x.py runs the tests that say "ui (nll)" at the beginning</p>



<a name="127386067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386067">(May 31 2018 at 22:06)</a>:</h4>
<p>ahh ok ok</p>



<a name="127386068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386068">(May 31 2018 at 22:06)</a>:</h4>
<p>is happening now</p>



<a name="127386071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386071">(May 31 2018 at 22:07)</a>:</h4>
<p>but you'll only see the "ui (nll)" stuf if you get through all the "ui" ones</p>



<a name="127386074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386074">(May 31 2018 at 22:07)</a>:</h4>
<p>thing is still running</p>



<a name="127386077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386077">(May 31 2018 at 22:07)</a>:</h4>
<p>yeah, now is running nll</p>



<a name="127386079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386079">(May 31 2018 at 22:07)</a>:</h4>
<p>(and <em>some</em> of the "ui/" tests do test nll)</p>



<a name="127386088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386088">(May 31 2018 at 22:07)</a>:</h4>
<p>((via <code>#![feature(nll)]</code> or <code>// compile-flags: -Z borrowck=mir</code>))</p>



<a name="127386218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386218">(May 31 2018 at 22:10)</a>:</h4>
<p>hmm seems like there's something wrong</p>



<a name="127386221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386221">(May 31 2018 at 22:10)</a>:</h4>
<p>anyway, I'm going to open a PR to start discussing there</p>



<a name="127386309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386309">(May 31 2018 at 22:12)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> <span class="user-mention" data-user-id="116009">@nikomatsakis</span> <a href="https://github.com/rust-lang/rust/pull/51260" target="_blank" title="https://github.com/rust-lang/rust/pull/51260">https://github.com/rust-lang/rust/pull/51260</a></p>



<a name="127386335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386335">(May 31 2018 at 22:13)</a>:</h4>
<p>first ... it's suggesting this <a href="https://github.com/rust-lang/rust/pull/51260/files#diff-578a4b3f2943cb22662f35f6a89da7c5R22" target="_blank" title="https://github.com/rust-lang/rust/pull/51260/files#diff-578a4b3f2943cb22662f35f6a89da7c5R22">https://github.com/rust-lang/rust/pull/51260/files#diff-578a4b3f2943cb22662f35f6a89da7c5R22</a> two times</p>



<a name="127386378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386378">(May 31 2018 at 22:14)</a>:</h4>
<p>this <a href="https://github.com/rust-lang/rust/pull/51260/files#diff-d19757776de8707f9d197b79b47bd13cR4" target="_blank" title="https://github.com/rust-lang/rust/pull/51260/files#diff-d19757776de8707f9d197b79b47bd13cR4">https://github.com/rust-lang/rust/pull/51260/files#diff-d19757776de8707f9d197b79b47bd13cR4</a> seems to be wrong</p>



<a name="127386384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386384">(May 31 2018 at 22:14)</a>:</h4>
<p>same here <a href="https://github.com/rust-lang/rust/pull/51260/files#diff-1d29243a06fb339b8c5db5217d279a3aR4" target="_blank" title="https://github.com/rust-lang/rust/pull/51260/files#diff-1d29243a06fb339b8c5db5217d279a3aR4">https://github.com/rust-lang/rust/pull/51260/files#diff-1d29243a06fb339b8c5db5217d279a3aR4</a></p>



<a name="127386403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386403">(May 31 2018 at 22:15)</a>:</h4>
<p>need to check it out, tomorrow will take a look at it</p>



<a name="127386406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386406">(May 31 2018 at 22:15)</a>:</h4>
<p>yeah both those things seem wrong</p>



<a name="127386466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127386466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127386466">(May 31 2018 at 22:16)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> In the first one, the "second error" is in the source?</p>



<a name="127398012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127398012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127398012">(Jun 01 2018 at 04:01)</a>:</h4>
<blockquote>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> In the first one, the "second error" is in the source?</p>
</blockquote>
<p><span class="user-mention" data-user-id="116118">@Matthew Jasper</span> you're right so it's correct</p>



<a name="127398013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127398013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127398013">(Jun 01 2018 at 04:01)</a>:</h4>
<p>I need to check all this</p>



<a name="127398014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127398014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127398014">(Jun 01 2018 at 04:01)</a>:</h4>
<p>was in a rush and did everything quickly</p>



<a name="127398015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127398015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127398015">(Jun 01 2018 at 04:01)</a>:</h4>
<p>tomorrow will take a look at it</p>



<a name="127406268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127406268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127406268">(Jun 01 2018 at 08:37)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> that PR includes various changes to the stderr files — are those the complete set of effects? (also, you know about <code>--bless</code>, right?)</p>



<a name="127406271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127406271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127406271">(Jun 01 2018 at 08:37)</a>:</h4>
<p>it looks like an awesome start!</p>



<a name="127406638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127406638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127406638">(Jun 01 2018 at 08:50)</a>:</h4>
<p>left some comments anyway</p>



<a name="127408252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408252">(Jun 01 2018 at 09:38)</a>:</h4>
<p>hey niko, I've been wondering (and I may have said this on a github issue comment somewhere...): Might it make more sense to do these access checks on something closer to the AST, like the HAIR? Right now the suggestion code is going through machinations to try to reconstruct spans of initializing expressions based on searches over the assignment statements.</p>



<a name="127408255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408255">(Jun 01 2018 at 09:38)</a>:</h4>
<p>But access checks do not need regions nor control-flow graph info.</p>



<a name="127408263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408263">(Jun 01 2018 at 09:38)</a>:</h4>
<p>They are really shallow inspections of the types, right?</p>



<a name="127408268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408268">(Jun 01 2018 at 09:39)</a>:</h4>
<p>(maybe I'm overlooking some that do need that more MIR-oriented info...)</p>



<a name="127408275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408275">(Jun 01 2018 at 09:39)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> ^</p>



<a name="127408325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408325">(Jun 01 2018 at 09:40)</a>:</h4>
<p>plausibly</p>



<a name="127408326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408326">(Jun 01 2018 at 09:40)</a>:</h4>
<p>we have no such IR at this point</p>



<a name="127408329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408329">(Jun 01 2018 at 09:40)</a>:</h4>
<p>so we'd have to split up the borrow-ck</p>



<a name="127408331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408331">(Jun 01 2018 at 09:40)</a>:</h4>
<p>and/or maybe do these things at typeck time</p>



<a name="127408335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408335">(Jun 01 2018 at 09:40)</a>:</h4>
<p>(which might be fine)</p>



<a name="127408340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408340">(Jun 01 2018 at 09:41)</a>:</h4>
<p>I'd be ok with borrowck getting to live in a world where all variables can be assumed to be mut</p>



<a name="127408345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408345">(Jun 01 2018 at 09:41)</a>:</h4>
<p>oh, I remember why we don't do that</p>



<a name="127408349"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408349" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408349">(Jun 01 2018 at 09:41)</a>:</h4>
<p>well</p>



<a name="127408352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408352">(Jun 01 2018 at 09:41)</a>:</h4>
<p>it's because of the flow sensitivity for <code>let x</code></p>



<a name="127408353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408353">(Jun 01 2018 at 09:41)</a>:</h4>
<p>we need to ensure <code>let x;</code> is initialized once and only once</p>



<a name="127408355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408355">(Jun 01 2018 at 09:42)</a>:</h4>
<p>Right. So <em>that</em> is a control-flow graph thing</p>



<a name="127408395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408395">(Jun 01 2018 at 09:42)</a>:</h4>
<p>I guess "how bad is it" is a question :)</p>



<a name="127408397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408397">(Jun 01 2018 at 09:42)</a>:</h4>
<p>like, finding assignments seems... not so hard</p>



<a name="127408407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408407">(Jun 01 2018 at 09:42)</a>:</h4>
<p>Anyway either way the current code for<code>fn check_access_permissions</code> is a real mess</p>



<a name="127408416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408416">(Jun 01 2018 at 09:43)</a>:</h4>
<p>otoh if borrowck could just assume all locals are mutable for purposes of borrowing — even if it is also checked assignments for no doubl assignment — that might be really nice</p>



<a name="127408420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408420">(Jun 01 2018 at 09:43)</a>:</h4>
<p>I hate that "treat-local-as-mutable" flag</p>



<a name="127408421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408421">(Jun 01 2018 at 09:43)</a>:</h4>
<p>I'm experimenting with trying to simplify it, in much the way that you proposed in some comment</p>



<a name="127408426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408426">(Jun 01 2018 at 09:43)</a>:</h4>
<p>yeah, it is</p>



<a name="127408430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408430">(Jun 01 2018 at 09:43)</a>:</h4>
<p>luckily some of the ugliness in the code is easy to undo</p>



<a name="127408433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408433">(Jun 01 2018 at 09:43)</a>:</h4>
<p>e.g. there were some refactorings that were ... poorly chosen.</p>



<a name="127408436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408436">(Jun 01 2018 at 09:44)</a>:</h4>
<p>I think borrowck has accumulated some amount of technical debt</p>



<a name="127408473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408473">(Jun 01 2018 at 09:44)</a>:</h4>
<p>sort of amazing for code so young :)</p>



<a name="127408476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408476">(Jun 01 2018 at 09:44)</a>:</h4>
<p>and some pyramid of doom stuff that is also easy to fix</p>



<a name="127408479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408479">(Jun 01 2018 at 09:44)</a>:</h4>
<p>but it needs to be smoothed over...</p>



<a name="127408480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408480">(Jun 01 2018 at 09:44)</a>:</h4>
<p>Well we had a <em>lot</em> of enthusiastic volunteers</p>



<a name="127408482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408482">(Jun 01 2018 at 09:44)</a>:</h4>
<p>during the 2017 impl period</p>



<a name="127408484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408484">(Jun 01 2018 at 09:44)</a>:</h4>
<p>and I think the scattered style in the code reflects that mix of volunteers</p>



<a name="127408485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408485">(Jun 01 2018 at 09:44)</a>:</h4>
<p>right, I imagine that part of it is just a byproduct of many people hacking</p>



<a name="127408540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408540">(Jun 01 2018 at 09:46)</a>:</h4>
<p>So here's an example of something that I would like to fix and am not sure how best to do so</p>



<a name="127408543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408543">(Jun 01 2018 at 09:46)</a>:</h4>
<p>(this is output from a local branch of the code)</p>



<a name="127408546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408546">(Jun 01 2018 at 09:46)</a>:</h4>
<div class="codehilite"><pre><span></span>6 |     fn f(&amp;self) {
  |          ----- help: consider changing this to be a mutable reference: `&amp;mut Foo&lt;&#39;_&gt;`
</pre></div>



<a name="127408561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408561">(Jun 01 2018 at 09:47)</a>:</h4>
<p>you can see (if you scroll or if you window is large enough), that my attempt to fix rust-lang/rust#51032 is currently suggesting <code>&amp;mut Foo&lt;'_&gt;</code> as the code to write when its highlighting <code>&amp;self</code></p>



<a name="127408605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408605">(Jun 01 2018 at 09:48)</a>:</h4>
<p>fwiw, this is also a problem in typeck</p>



<a name="127408607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408607">(Jun 01 2018 at 09:48)</a>:</h4>
<p>Does the MIR LocalDecl  actually carry the info I would need to distinguish this,</p>



<a name="127408608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408608">(Jun 01 2018 at 09:48)</a>:</h4>
<p>we often exclude <code>self</code> from suggestions because we've not got a nice helper for handling it</p>



<a name="127408612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408612">(Jun 01 2018 at 09:48)</a>:</h4>
<p>or do I add such info</p>



<a name="127408615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408615">(Jun 01 2018 at 09:48)</a>:</h4>
<p>or do we try to put these checks on the HAIR instead</p>



<a name="127408626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408626">(Jun 01 2018 at 09:49)</a>:</h4>
<blockquote>
<p>fwiw, this is also a problem in typeck</p>
</blockquote>
<p>that is interesting. (I assume here you mean mir-typeck)</p>



<a name="127408628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408628">(Jun 01 2018 at 09:49)</a>:</h4>
<p>no</p>



<a name="127408629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408629">(Jun 01 2018 at 09:49)</a>:</h4>
<p>I mean AST type check</p>



<a name="127408631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408631">(Jun 01 2018 at 09:49)</a>:</h4>
<p>Really?</p>



<a name="127408635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408635">(Jun 01 2018 at 09:49)</a>:</h4>
<p>So the cases where I see it suggested, its because some coder has put in heroics?</p>



<a name="127408636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408636">(Jun 01 2018 at 09:50)</a>:</h4>
<p>presumably</p>



<a name="127408676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408676">(Jun 01 2018 at 09:50)</a>:</h4>
<p>hmm</p>



<a name="127408684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408684">(Jun 01 2018 at 09:50)</a>:</h4>
<p>Another option here of course</p>



<a name="127408686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408686">(Jun 01 2018 at 09:50)</a>:</h4>
<p>it seems like we can add some info the MIR here</p>



<a name="127408687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408687">(Jun 01 2018 at 09:50)</a>:</h4>
<p>would be for me to actually convert the span to a snippet and then inspect that snippet</p>



<a name="127408692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408692">(Jun 01 2018 at 09:50)</a>:</h4>
<p>but I really don't like that</p>



<a name="127408694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408694">(Jun 01 2018 at 09:50)</a>:</h4>
<p>yeah, that seems unfortuante</p>



<a name="127408697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408697">(Jun 01 2018 at 09:50)</a>:</h4>
<p>I guess I think that <code>LocalDecl</code> could well carry more info than just "is-user-variable"</p>



<a name="127408704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408704">(Jun 01 2018 at 09:51)</a>:</h4>
<p>e.g., that might be an enum that tells you if this is <code>self</code></p>



<a name="127408706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408706">(Jun 01 2018 at 09:51)</a>:</h4>
<p>or some pattern binding</p>



<a name="127408707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408707">(Jun 01 2018 at 09:51)</a>:</h4>
<blockquote>
<p>would be for me to actually convert the span to a snippet and then inspect that snippet</p>
</blockquote>
<p>its especially bad because it leads to things like this: <a href="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/borrow_check/mod.rs#L1753" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/borrow_check/mod.rs#L1753">https://github.com/rust-lang/rust/blob/master/src/librustc_mir/borrow_check/mod.rs#L1753</a></p>



<a name="127408713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408713">(Jun 01 2018 at 09:51)</a>:</h4>
<p>Okay I think I'm going to look into extending <code>LocalDecl</code>. That at least sounds like the most direct solution to the family of problems I am encountering here.</p>



<a name="127408757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408757">(Jun 01 2018 at 09:52)</a>:</h4>
<p>that said, I don't disagree that some suggestions are easier to make on the expression tree, that must be true :/</p>



<a name="127408762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408762">(Jun 01 2018 at 09:52)</a>:</h4>
<p>but it would be a significant refactoring to move analysis to the HAIR</p>



<a name="127408768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408768">(Jun 01 2018 at 09:52)</a>:</h4>
<p>I'd be more in favor of moving checks to the initial typeck</p>



<a name="127408770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408770">(Jun 01 2018 at 09:52)</a>:</h4>
<p>though I am also wary</p>



<a name="127408777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408777">(Jun 01 2018 at 09:53)</a>:</h4>
<p>particularly because it's not always obvious</p>



<a name="127408779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408779">(Jun 01 2018 at 09:53)</a>:</h4>
<p>e.g., <code>let x = &amp;mut foo.bar.baz</code></p>



<a name="127408780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408780">(Jun 01 2018 at 09:53)</a>:</h4>
<p>even if you have <code>let mut foo</code>, if <code>bar</code> implements <code>Deref</code> but not <code>DerefMut</code>, this is an error</p>



<a name="127408794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408794">(Jun 01 2018 at 09:53)</a>:</h4>
<p>indeed dodging all these horrible things is part of the point of MIR :)</p>



<a name="127408834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408834">(Jun 01 2018 at 09:54)</a>:</h4>
<p>I forget just how explicit that stuff is in HAIR</p>



<a name="127408837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408837">(Jun 01 2018 at 09:54)</a>:</h4>
<p>much more so than HIR</p>



<a name="127408840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408840">(Jun 01 2018 at 09:54)</a>:</h4>
<p>I don't know, I think it's an interesting idea we should think about</p>



<a name="127408849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408849">(Jun 01 2018 at 09:55)</a>:</h4>
<p>but also sounds like a big distraction</p>



<a name="127408851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408851">(Jun 01 2018 at 09:55)</a>:</h4>
<p>true</p>



<a name="127408852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408852">(Jun 01 2018 at 09:55)</a>:</h4>
<p>Probably too much work to try to do in short term</p>



<a name="127408854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408854">(Jun 01 2018 at 09:55)</a>:</h4>
<p>better to perhaps release something based entirely on MIR</p>



<a name="127408855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408855">(Jun 01 2018 at 09:55)</a>:</h4>
<p>in short term</p>



<a name="127408859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408859">(Jun 01 2018 at 09:55)</a>:</h4>
<p>with some missing diagnostics or subpar ones</p>



<a name="127408863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408863">(Jun 01 2018 at 09:56)</a>:</h4>
<p>and investigate doing it atop HAIR later</p>



<a name="127408928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408928">(Jun 01 2018 at 09:57)</a>:</h4>
<p>yeah; I'd like to make HAIR more of a "first-class" IR</p>



<a name="127408931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408931">(Jun 01 2018 at 09:57)</a>:</h4>
<p>in particular</p>



<a name="127408933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408933">(Jun 01 2018 at 09:57)</a>:</h4>
<p>I also think we should do the "effect check" on HAIR</p>



<a name="127408935"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408935" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408935">(Jun 01 2018 at 09:57)</a>:</h4>
<p>the unsafe check, that is</p>



<a name="127408977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127408977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127408977">(Jun 01 2018 at 09:58)</a>:</h4>
<p>gotta go but my hope is to focus on NLL today</p>



<a name="127417108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127417108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127417108">(Jun 01 2018 at 13:53)</a>:</h4>
<p>I'd be more than happy to help with refactoring if you decide so at some point</p>



<a name="127417112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127417112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127417112">(Jun 01 2018 at 13:53)</a>:</h4>
<p>I think this kind of tasks are a very nice way to learn projects in general and the compiler in this case in particular</p>



<a name="127420030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127420030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127420030">(Jun 01 2018 at 14:54)</a>:</h4>
<p>the problem is I think not knowing <em>exactly</em> what to do yet</p>



<a name="127420037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127420037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127420037">(Jun 01 2018 at 14:54)</a>:</h4>
<p>I'm hoping to have something to share soon</p>



<a name="127420046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127420046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127420046">(Jun 01 2018 at 14:55)</a>:</h4>
<p>its almost certainly going to stomp all over the PR that you put up, <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span></p>



<a name="127420053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127420053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127420053">(Jun 01 2018 at 14:55)</a>:</h4>
<p>but its good that you put up that PR</p>



<a name="127420060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127420060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127420060">(Jun 01 2018 at 14:55)</a>:</h4>
<p>because it makes me confident that you can give me some solid feedback on this branch. :)</p>



<a name="127420117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127420117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127420117">(Jun 01 2018 at 14:56)</a>:</h4>
<p>(but my branch is much broader; its trying to resolve a <em>lot</em> of the issues we have with suggestions that arise from <code>fn check_access_permissions</code>)</p>



<a name="127421157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127421157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127421157">(Jun 01 2018 at 15:16)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> cool :)</p>



<a name="127421165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127421165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127421165">(Jun 01 2018 at 15:16)</a>:</h4>
<p>still couldn't get into this thing</p>



<a name="127421171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127421171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127421171">(Jun 01 2018 at 15:16)</a>:</h4>
<p>will do in ~30mins</p>



<a name="127422081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127422081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127422081">(Jun 01 2018 at 15:35)</a>:</h4>
<p>Okay so here's the start of my big revision to <code>fn check_access_permissions</code> (which necessitated changes more broadly): <a href="https://github.com/rust-lang/rust/pull/51275" target="_blank" title="https://github.com/rust-lang/rust/pull/51275">https://github.com/rust-lang/rust/pull/51275</a></p>



<a name="127422128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127422128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127422128">(Jun 01 2018 at 15:36)</a>:</h4>
<p>I have to go home now</p>



<a name="127422132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127422132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127422132">(Jun 01 2018 at 15:36)</a>:</h4>
<p>but you can tell from that how many things I'm looking at touching</p>



<a name="127422160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127422160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127422160">(Jun 01 2018 at 15:37)</a>:</h4>
<p>(also ... in one case the error code emitted by the NLL error changed, which surprised me...)</p>



<a name="127422163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127422163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127422163">(Jun 01 2018 at 15:37)</a>:</h4>
<p>(maybe more than one case, not sure yet...)</p>



<a name="127422170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127422170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127422170">(Jun 01 2018 at 15:37)</a>:</h4>
<p>Hopefully I'll have a chance this weekend to follow up on that PR</p>



<a name="127422233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127422233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127422233">(Jun 01 2018 at 15:38)</a>:</h4>
<p>((oh and in some cases the suggestion to use <code>&amp;mut</code> needs to be silenced. that should be readily doable with the changes I made to <code>mir::LocalDecl</code> in that PR...))</p>



<a name="127424093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127424093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127424093">(Jun 01 2018 at 16:20)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> making the changes now</p>



<a name="127424097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127424097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127424097">(Jun 01 2018 at 16:20)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/51260#discussion_r192332562" target="_blank" title="https://github.com/rust-lang/rust/pull/51260#discussion_r192332562">https://github.com/rust-lang/rust/pull/51260#discussion_r192332562</a></p>



<a name="127424104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127424104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127424104">(Jun 01 2018 at 16:20)</a>:</h4>
<p>link 1 is not a link</p>



<a name="127426510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127426510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127426510">(Jun 01 2018 at 17:12)</a>:</h4>
<p>what the</p>



<a name="127426536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127426536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127426536">(Jun 01 2018 at 17:13)</a>:</h4>
<p>should be <a href="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1723-L1728" target="_blank" title="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1723-L1728">https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1723-L1728</a></p>



<a name="127426934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127426934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127426934">(Jun 01 2018 at 17:20)</a>:</h4>
<p>not sure what's up w/ github and links</p>



<a name="127426938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127426938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127426938">(Jun 01 2018 at 17:20)</a>:</h4>
<p>that said, we should compare against what pnkfelix did</p>



<a name="127426955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127426955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127426955">(Jun 01 2018 at 17:20)</a>:</h4>
<p>I was going to mention a couple of things</p>



<a name="127426956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127426956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127426956">(Jun 01 2018 at 17:20)</a>:</h4>
<p>first</p>



<a name="127426967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127426967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127426967">(Jun 01 2018 at 17:21)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1789-L1798" target="_blank" title="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1789-L1798">https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1789-L1798</a></p>



<a name="127426971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127426971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127426971">(Jun 01 2018 at 17:21)</a>:</h4>
<p>err.emit() not being called there</p>



<a name="127426973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127426973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127426973">(Jun 01 2018 at 17:21)</a>:</h4>
<p>unsure why</p>



<a name="127426981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127426981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127426981">(Jun 01 2018 at 17:21)</a>:</h4>
<p>and if I move emit() outside it will be called when it wasn't in that case</p>



<a name="127426982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127426982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127426982">(Jun 01 2018 at 17:21)</a>:</h4>
<p>second</p>



<a name="127426985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127426985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127426985">(Jun 01 2018 at 17:21)</a>:</h4>
<p>match would need to return a pair</p>



<a name="127427029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427029">(Jun 01 2018 at 17:22)</a>:</h4>
<p>(err, place_err)</p>



<a name="127427164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427164">(Jun 01 2018 at 17:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> I don't think that <code>delay_span_bug</code> needs to be emitted; in cases like that, I would expect to just return early and not fall through to the latter code.</p>



<a name="127427224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427224">(Jun 01 2018 at 17:26)</a>:</h4>
<p>ok</p>



<a name="127427242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427242">(Jun 01 2018 at 17:26)</a>:</h4>
<blockquote>
<p>match would need to return a pair</p>
</blockquote>
<p>sure, ok</p>



<a name="127427249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427249">(Jun 01 2018 at 17:26)</a>:</h4>
<p>seems fine...</p>



<a name="127427266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427266">(Jun 01 2018 at 17:27)</a>:</h4>
<p>but that case doesn't need the Local and Projection checks we will be doing outside?</p>



<a name="127427280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427280">(Jun 01 2018 at 17:27)</a>:</h4>
<div class="codehilite"><pre><span></span>            Reservation(WriteKind::Move)
            | Write(WriteKind::Move)
            | Reservation(WriteKind::StorageDeadOrDrop)
            | Reservation(WriteKind::MutableBorrow(BorrowKind::Shared))
            | Write(WriteKind::StorageDeadOrDrop)
            | Write(WriteKind::MutableBorrow(BorrowKind::Shared)) =&gt; {
                if let Err(place_err) = self.is_mutable(place, is_local_mutation_allowed) {
                    self.tcx.sess.delay_span_bug(
                        span,
                        &amp;format!(
                            &quot;Accessing `{:?}` with the kind `{:?}` shouldn&#39;t be possible&quot;,
                            place, kind
                        ),
                    );
                }

                return;
            }
</pre></div>



<a name="127427319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427319">(Jun 01 2018 at 17:28)</a>:</h4>
<p>so the match place_err won't execute</p>



<a name="127427457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427457">(Jun 01 2018 at 17:31)</a>:</h4>
<p>well, <code>delay_span_bug</code> basically says: if this happens, abort compilation</p>



<a name="127427460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427460">(Jun 01 2018 at 17:31)</a>:</h4>
<p>in doesn't abort <em>immediately</em></p>



<a name="127427463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427463">(Jun 01 2018 at 17:31)</a>:</h4>
<p>it aborts only if no type errors occur</p>



<a name="127427467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427467">(Jun 01 2018 at 17:31)</a>:</h4>
<p>it means that this condition should not happen,</p>



<a name="127427470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427470">(Jun 01 2018 at 17:31)</a>:</h4>
<p>but might happen if the user's code doesn't type check</p>



<a name="127427508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427508">(Jun 01 2018 at 17:32)</a>:</h4>
<p>so in general we should not report further errors in that case anyway</p>



<a name="127427778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427778">(Jun 01 2018 at 17:37)</a>:</h4>
<p>ok</p>



<a name="127427839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127427839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127427839">(Jun 01 2018 at 17:38)</a>:</h4>
<p>interesting, this is dead code <a href="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1733-L1735" target="_blank" title="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1733-L1735">https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1733-L1735</a></p>



<a name="127428003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428003">(Jun 01 2018 at 17:40)</a>:</h4>
<p>yes, yes it is :)</p>



<a name="127428008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428008">(Jun 01 2018 at 17:40)</a>:</h4>
<p>not sure if it <em>should be</em></p>



<a name="127428032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428032">(Jun 01 2018 at 17:41)</a>:</h4>
<p>I don't really get what that <code>if</code> is trying to do</p>



<a name="127428092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428092">(Jun 01 2018 at 17:42)</a>:</h4>
<p>what does blame says?</p>



<a name="127428281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428281">(Jun 01 2018 at 17:46)</a>:</h4>
<p>added here <a href="https://github.com/rust-lang/rust/commit/0c7fc046d3271b8fe31b3c2d168af4f4ab90bcdc" target="_blank" title="https://github.com/rust-lang/rust/commit/0c7fc046d3271b8fe31b3c2d168af4f4ab90bcdc">https://github.com/rust-lang/rust/commit/0c7fc046d3271b8fe31b3c2d168af4f4ab90bcdc</a></p>



<a name="127428341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428341">(Jun 01 2018 at 17:47)</a>:</h4>
<p>it was before</p>



<a name="127428343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428343">(Jun 01 2018 at 17:47)</a>:</h4>
<p>looking</p>



<a name="127428399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428399">(Jun 01 2018 at 17:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> have you looked at <a href="https://github.com/rust-lang/rust/pull/51275" target="_blank" title="https://github.com/rust-lang/rust/pull/51275">@**pnkfelix**'s PR</a>? It definitely changes all this code</p>



<a name="127428405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428405">(Jun 01 2018 at 17:48)</a>:</h4>
<p>I think it incorporates some of your work</p>



<a name="127428436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428436">(Jun 01 2018 at 17:48)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/commit/7d590b533ea93ef916cc82498506a373db1843b6" target="_blank" title="https://github.com/rust-lang/rust/commit/7d590b533ea93ef916cc82498506a373db1843b6">https://github.com/rust-lang/rust/commit/7d590b533ea93ef916cc82498506a373db1843b6</a></p>



<a name="127428441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428441">(Jun 01 2018 at 17:49)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> no</p>



<a name="127428456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428456">(Jun 01 2018 at 17:49)</a>:</h4>
<p>I was compiling this thing</p>



<a name="127428463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428463">(Jun 01 2018 at 17:49)</a>:</h4>
<p>changing stuff</p>



<a name="127428468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428468">(Jun 01 2018 at 17:49)</a>:</h4>
<p>so ... should I place my work on top of Felix?</p>



<a name="127428476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428476">(Jun 01 2018 at 17:49)</a>:</h4>
<p>or should I land this?</p>



<a name="127428537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428537">(Jun 01 2018 at 17:50)</a>:</h4>
<p>I don't know :)</p>



<a name="127428544"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428544" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428544">(Jun 01 2018 at 17:50)</a>:</h4>
<p>too bad <span class="user-mention" data-user-id="116083">@pnkfelix</span> is not around</p>



<a name="127428572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428572">(Jun 01 2018 at 17:50)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/51275/files#diff-5b4d01d26caf43976125ba0f877e78c0R1808" target="_blank" title="https://github.com/rust-lang/rust/pull/51275/files#diff-5b4d01d26caf43976125ba0f877e78c0R1808">this part I think is from your PR</a></p>



<a name="127428594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428594">(Jun 01 2018 at 17:51)</a>:</h4>
<p>I guess I can fix this stuff and provide the PR so we can merge</p>



<a name="127428607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428607">(Jun 01 2018 at 17:51)</a>:</h4>
<p>and then work on top of Felix's or I can redo my stuff</p>



<a name="127428609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428609">(Jun 01 2018 at 17:51)</a>:</h4>
<p>whatever :)</p>



<a name="127428621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428621">(Jun 01 2018 at 17:51)</a>:</h4>
<p>so ... when you were poiting to this <a href="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1723-L1728" target="_blank" title="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1723-L1728">https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1723-L1728</a></p>



<a name="127428629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428629">(Jun 01 2018 at 17:51)</a>:</h4>
<p>were you referring to move that outside of this match?</p>



<a name="127428632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428632">(Jun 01 2018 at 17:51)</a>:</h4>
<p>or to reuse the match condition?</p>



<a name="127428676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428676">(Jun 01 2018 at 17:52)</a>:</h4>
<p>I was reusing the condition</p>



<a name="127428683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428683">(Jun 01 2018 at 17:52)</a>:</h4>
<p>but I may have understood wrong</p>



<a name="127428709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428709">(Jun 01 2018 at 17:53)</a>:</h4>
<blockquote>
<p>were you referring to move that outside of this match?</p>
</blockquote>
<p>I think this is what I meant</p>



<a name="127428717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428717">(Jun 01 2018 at 17:53)</a>:</h4>
<p>basically, that code is conflating two things</p>



<a name="127428719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428719">(Jun 01 2018 at 17:53)</a>:</h4>
<p>pnkfelix's PR kind of pulls them apart</p>



<a name="127428720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428720">(Jun 01 2018 at 17:53)</a>:</h4>
<p>the first is the "main" error msg</p>



<a name="127428722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428722">(Jun 01 2018 at 17:53)</a>:</h4>
<p>the second is the suggestions for fixing it</p>



<a name="127428726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428726">(Jun 01 2018 at 17:53)</a>:</h4>
<p>we want to use distinct main error messages in different cases</p>



<a name="127428728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428728">(Jun 01 2018 at 17:53)</a>:</h4>
<p>but the suggestions apply to all cases</p>



<a name="127428738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428738">(Jun 01 2018 at 17:53)</a>:</h4>
<p>right now, the code is applying those suggestions (e.g., make this variable <code>mut</code>) only in particular cases though</p>



<a name="127428803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428803">(Jun 01 2018 at 17:54)</a>:</h4>
<p>my feeling <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> is that your current PR is subsumed by what <span class="user-mention" data-user-id="116083">@pnkfelix</span> was doing;</p>



<a name="127428807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428807">(Jun 01 2018 at 17:54)</a>:</h4>
<p>but <span class="user-mention" data-user-id="116083">@pnkfelix</span>'s PR still could use some add'l cases</p>



<a name="127428811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428811">(Jun 01 2018 at 17:55)</a>:</h4>
<p>not sure whether it makes sense to wait or what</p>



<a name="127428823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428823">(Jun 01 2018 at 17:55)</a>:</h4>
<p>(e.g., I don't think that their PR handles upvars)</p>



<a name="127428826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428826">(Jun 01 2018 at 17:55)</a>:</h4>
<p>unsure</p>



<a name="127428829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428829">(Jun 01 2018 at 17:55)</a>:</h4>
<p>I can wait for him to finish the stuff and then try to continue with this</p>



<a name="127428831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428831">(Jun 01 2018 at 17:55)</a>:</h4>
<p>I'm fine with both things :)</p>



<a name="127428924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428924">(Jun 01 2018 at 17:57)</a>:</h4>
<p>but yeah current code it's confusing</p>



<a name="127428966"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428966" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428966">(Jun 01 2018 at 17:58)</a>:</h4>
<p>hmm</p>



<a name="127428971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428971">(Jun 01 2018 at 17:58)</a>:</h4>
<p>maybe we should look for a bug in a related area?</p>



<a name="127428976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428976">(Jun 01 2018 at 17:58)</a>:</h4>
<p>that is, now that you're getting familiar with those data structures</p>



<a name="127428989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127428989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127428989">(Jun 01 2018 at 17:58)</a>:</h4>
<p>prob doesn't make sense for you to extend their PR</p>



<a name="127429002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429002">(Jun 01 2018 at 17:59)</a>:</h4>
<p>especially as <span class="user-mention" data-user-id="116083">@pnkfelix</span> may have uncommited edits or something</p>



<a name="127429003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429003">(Jun 01 2018 at 17:59)</a>:</h4>
<p>yep</p>



<a name="127429013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429013">(Jun 01 2018 at 17:59)</a>:</h4>
<p>maybe this one? <a href="https://github.com/rust-lang/rust/issues/51217" target="_blank" title="https://github.com/rust-lang/rust/issues/51217">https://github.com/rust-lang/rust/issues/51217</a></p>



<a name="127429019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429019">(Jun 01 2018 at 17:59)</a>:</h4>
<p>I don't think that is caused by this same fn</p>



<a name="127429069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429069">(Jun 01 2018 at 18:00)</a>:</h4>
<p>when <span class="user-mention" data-user-id="116083">@pnkfelix</span> finish the stuff we can check if he added all what I have, if he didn't I add this and done :)</p>



<a name="127429103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429103">(Jun 01 2018 at 18:00)</a>:</h4>
<p>it comes from <a href="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1395" target="_blank" title="https://github.com/rust-lang/rust/blob/61f35e507a56dcdce88bfce99bb2d1eeacb0e9d1/src/librustc_mir/borrow_check/mod.rs#L1395">this call to <code>report_illegal_reassignment</code> right here</a></p>



<a name="127429128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429128">(Jun 01 2018 at 18:01)</a>:</h4>
<p>hmm</p>



<a name="127429143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429143">(Jun 01 2018 at 18:01)</a>:</h4>
<p>oh, I see that <span class="user-mention" data-user-id="116118">@Matthew Jasper</span> assigned themselves on that one</p>



<a name="127429201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429201">(Jun 01 2018 at 18:02)</a>:</h4>
<p>maybe this one? <a href="https://github.com/rust-lang/rust/issues/51195" target="_blank" title="https://github.com/rust-lang/rust/issues/51195">https://github.com/rust-lang/rust/issues/51195</a></p>



<a name="127429224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429224">(Jun 01 2018 at 18:03)</a>:</h4>
<p>I've not looked precisely at the conditions in which that msg is emitted</p>



<a name="127429290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429290">(Jun 01 2018 at 18:04)</a>:</h4>
<p>ok</p>



<a name="127429293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429293">(Jun 01 2018 at 18:04)</a>:</h4>
<p>won't have that much time today</p>



<a name="127429297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429297">(Jun 01 2018 at 18:05)</a>:</h4>
<p>but will have it as the next thing to do</p>



<a name="127429317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429317">(Jun 01 2018 at 18:05)</a>:</h4>
<p>ok; first thing to do would be to look at the old borrow checker</p>



<a name="127429321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429321">(Jun 01 2018 at 18:05)</a>:</h4>
<p>and see where that msg is emitted and under which conditions</p>



<a name="127429363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127429363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127429363">(Jun 01 2018 at 18:06)</a>:</h4>
<p>then we can think about the equivalent in MIR land</p>



<a name="127430478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127430478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127430478">(Jun 01 2018 at 18:29)</a>:</h4>
<p><span class="emoji emoji-1f44d" title="+1">:+1:</span></p>



<a name="127430556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127430556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127430556">(Jun 01 2018 at 18:30)</a>:</h4>
<p>I've force pushed to my branch in case there's something useful there</p>



<a name="127430569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127430569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127430569">(Jun 01 2018 at 18:30)</a>:</h4>
<p>I'm talking about the other PR</p>



<a name="127430586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127430586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127430586">(Jun 01 2018 at 18:31)</a>:</h4>
<p>if <span class="user-mention" data-user-id="116083">@pnkfelix</span> covers everything there great :)</p>



<a name="127430589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127430589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127430589">(Jun 01 2018 at 18:31)</a>:</h4>
<p>Re 51217, I thought it would be fixed with some of the MIR generation changes that I made for better move permissions errors, but they ended up having undesirable consequences. I'll try to write up where I got to on that issue this weekend.</p>



<a name="127430600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127430600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127430600">(Jun 01 2018 at 18:31)</a>:</h4>
<p>otherwise I can take another look at the thing</p>



<a name="127465009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127465009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127465009">(Jun 02 2018 at 12:54)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <a href="https://github.com/rust-lang/rust/issues/46020" target="_blank" title="https://github.com/rust-lang/rust/issues/46020">https://github.com/rust-lang/rust/issues/46020</a> I guess the report about this issue is duplicated with <a href="https://github.com/rust-lang/rust/issues/51031" target="_blank" title="https://github.com/rust-lang/rust/issues/51031">https://github.com/rust-lang/rust/issues/51031</a>, maybe I guess would be nice to relate them?</p>



<a name="127543111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127543111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127543111">(Jun 04 2018 at 12:46)</a>:</h4>
<p>(By the way, I would <em>love</em> for anyone to take a stab at figuring out a way to attack <a href="https://github.com/rust-lang/rust/issues/51167" target="_blank" title="https://github.com/rust-lang/rust/issues/51167">rust-lang/rust#51167</a> ... I guess I could try to throw on some mentoring instructions, but producing good ones might require just as much work as finding the actual implementation of a solution...)</p>



<a name="127556380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127556380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127556380">(Jun 04 2018 at 17:36)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="116083">@pnkfelix</span> should I still tackle this <a href="https://github.com/rust-lang/rust/issues/51195" target="_blank" title="https://github.com/rust-lang/rust/issues/51195">https://github.com/rust-lang/rust/issues/51195</a> ?</p>



<a name="127556391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127556391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127556391">(Jun 04 2018 at 17:36)</a>:</h4>
<p>Niko told me about it on friday, couldn't do anything yet</p>



<a name="127556408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127556408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127556408">(Jun 04 2018 at 17:37)</a>:</h4>
<p>and I'm about to start to work on something ...</p>



<a name="127556410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127556410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127556410">(Jun 04 2018 at 17:37)</a>:</h4>
<p>I'll wait for thoughts</p>



<a name="127559774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127559774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127559774">(Jun 04 2018 at 18:48)</a>:</h4>
<p>hey <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span></p>



<a name="127559776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127559776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127559776">(Jun 04 2018 at 18:48)</a>:</h4>
<p>that does sound like it would be useful to investigate</p>



<a name="127559780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127559780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127559780">(Jun 04 2018 at 18:49)</a>:</h4>
<p>I forget what you were doing before, I know we had some issue?</p>



<a name="127559783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127559783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127559783">(Jun 04 2018 at 18:49)</a>:</h4>
<p>was it that one?</p>



<a name="127559796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127559796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127559796">(Jun 04 2018 at 18:49)</a>:</h4>
<p>no</p>



<a name="127559850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127559850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127559850">(Jun 04 2018 at 18:50)</a>:</h4>
<p>I was with <a href="https://github.com/rust-lang/rust/issues/51031" target="_blank" title="https://github.com/rust-lang/rust/issues/51031">https://github.com/rust-lang/rust/issues/51031</a></p>



<a name="127559863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127559863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127559863">(Jun 04 2018 at 18:50)</a>:</h4>
<p>the code <span class="user-mention" data-user-id="116083">@pnkfelix</span> was writing it supposed to deal with that, so we closed the PR</p>



<a name="127559867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127559867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127559867">(Jun 04 2018 at 18:50)</a>:</h4>
<p>btw <a href="https://github.com/rust-lang/rust/issues/46020" target="_blank" title="https://github.com/rust-lang/rust/issues/46020">https://github.com/rust-lang/rust/issues/46020</a> seems like a dup</p>



<a name="127560200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127560200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127560200">(Jun 04 2018 at 18:58)</a>:</h4>
<p>true</p>



<a name="127560204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127560204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127560204">(Jun 04 2018 at 18:58)</a>:</h4>
<p>ok so</p>



<a name="127560212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127560212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127560212">(Jun 04 2018 at 18:58)</a>:</h4>
<p>regarding  <a href="https://github.com/rust-lang/rust/issues/51195" target="_blank" title="https://github.com/rust-lang/rust/issues/51195">https://github.com/rust-lang/rust/issues/51195</a></p>



<a name="127560228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127560228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127560228">(Jun 04 2018 at 18:59)</a>:</h4>
<p>I guess the thing to do is to run it and dump the MIR output and also kind of get a backtrace — that is, where is the error coming from within the <code>borrow_check/mod.rs</code> execution</p>



<a name="127560323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127560323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127560323">(Jun 04 2018 at 19:00)</a>:</h4>
<p>I guess most likely it comes when we are checking the <code>StorageDead</code>, but I'm not entirely sure</p>



<a name="127560916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127560916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127560916">(Jun 04 2018 at 19:13)</a>:</h4>
<p>ok</p>



<a name="127560919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127560919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127560919">(Jun 04 2018 at 19:13)</a>:</h4>
<p>thanks</p>



<a name="127567761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127567761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127567761">(Jun 04 2018 at 21:36)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> sorry I missed your earlier question; but yes, I do believe rust-lang/rust#51195 is worth investigating, and I do not think such investigation will overlap with big rewrite of <code>fn check_access_permissions</code>.</p>



<a name="127567782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127567782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127567782">(Jun 04 2018 at 21:37)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> cool, will do tomorrow</p>



<a name="127595822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127595822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127595822">(Jun 05 2018 at 11:55)</a>:</h4>
<p>if a given diagnostic under NLL gets to the point where it is providing the same info as AST-borrowck, and the only difference is in how the wording is phrased in the diagnostic...</p>



<a name="127595867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127595867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127595867">(Jun 05 2018 at 11:56)</a>:</h4>
<p>... should we perhaps just change the wording to match AST-borrowck (even if it is "inferior" in some sense), just to ease comparison between the two as we continue on this task?</p>



<a name="127597001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597001">(Jun 05 2018 at 12:26)</a>:</h4>
<p>example?</p>



<a name="127597136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597136">(Jun 05 2018 at 12:29)</a>:</h4>
<blockquote>
<p>example?</p>
</blockquote>
<p>let me see, I think the latest version of my <code>check_access_permissions</code> PR should have at least one test that illustrates this</p>



<a name="127597398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597398">(Jun 05 2018 at 12:35)</a>:</h4>
<p>okay so consider: <a href="https://github.com/pnkfelix/rust/blob/f0570baddc57f10400cfa017986476e14548dfac/src/test/ui/did_you_mean/issue-38147-1.nll.stderr" target="_blank" title="https://github.com/pnkfelix/rust/blob/f0570baddc57f10400cfa017986476e14548dfac/src/test/ui/did_you_mean/issue-38147-1.nll.stderr">https://github.com/pnkfelix/rust/blob/f0570baddc57f10400cfa017986476e14548dfac/src/test/ui/did_you_mean/issue-38147-1.nll.stderr</a></p>



<a name="127597403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597403">(Jun 05 2018 at 12:35)</a>:</h4>
<p>here's the diff of that nll.stderr file against the AST-borrowck stderr: <a href="https://gist.github.com/pnkfelix/c766479dea9706660f8f5dba22dacabd" target="_blank" title="https://gist.github.com/pnkfelix/c766479dea9706660f8f5dba22dacabd">https://gist.github.com/pnkfelix/c766479dea9706660f8f5dba22dacabd</a></p>



<a name="127597451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597451">(Jun 05 2018 at 12:36)</a>:</h4>
<p>If you ask me, saying "cannot borrow as mutable" for <code>self.s.push('x')</code> is "better" than saying "assignment into an immutable reference"</p>



<a name="127597458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597458">(Jun 05 2018 at 12:36)</a>:</h4>
<p>agreed</p>



<a name="127597459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597459">(Jun 05 2018 at 12:36)</a>:</h4>
<p>in terms of conveying what is actually happening in the code and what the compiler is objecting to</p>



<a name="127597462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597462">(Jun 05 2018 at 12:36)</a>:</h4>
<p>I'm not crazy about either of them</p>



<a name="127597464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597464">(Jun 05 2018 at 12:36)</a>:</h4>
<p>but in terms of our own process going forward</p>



<a name="127597467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597467">(Jun 05 2018 at 12:36)</a>:</h4>
<p>but it's better</p>



<a name="127597470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597470">(Jun 05 2018 at 12:36)</a>:</h4>
<p>I would sort of like to say "cannot write" :)</p>



<a name="127597473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597473">(Jun 05 2018 at 12:36)</a>:</h4>
<p>but that's .. probably a separate conversation</p>



<a name="127597475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597475">(Jun 05 2018 at 12:36)</a>:</h4>
<p>it may be "better" to make it exactly match the AST-borrowck output</p>



<a name="127597481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597481">(Jun 05 2018 at 12:37)</a>:</h4>
<p>until we turn NLL on by default</p>



<a name="127597482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597482">(Jun 05 2018 at 12:37)</a>:</h4>
<p>I'm torn</p>



<a name="127597487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597487">(Jun 05 2018 at 12:37)</a>:</h4>
<p>Having said that</p>



<a name="127597490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597490">(Jun 05 2018 at 12:37)</a>:</h4>
<p>on the one hand, i've been wanting to do a "review" of borrowck diagnostics</p>



<a name="127597491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597491">(Jun 05 2018 at 12:37)</a>:</h4>
<p>its not<em>so</em> bad looking at the diffs</p>



<a name="127597494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597494">(Jun 05 2018 at 12:37)</a>:</h4>
<p>and try to agree on consistent, minimal vocabulary</p>



<a name="127597496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597496">(Jun 05 2018 at 12:37)</a>:</h4>
<p>and use it everywhere</p>



<a name="127597498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597498">(Jun 05 2018 at 12:37)</a>:</h4>
<p>on the other hand, I see the value in matching</p>



<a name="127597499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597499">(Jun 05 2018 at 12:37)</a>:</h4>
<p>that said</p>



<a name="127597500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597500">(Jun 05 2018 at 12:37)</a>:</h4>
<p>(especially if you use a tool like ediff that highlights within the line)</p>



<a name="127597504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597504">(Jun 05 2018 at 12:37)</a>:</h4>
<p>and plus</p>



<a name="127597507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597507">(Jun 05 2018 at 12:37)</a>:</h4>
<p>it is easy enough to modify AST to match in cases where we think it's better now</p>



<a name="127597508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597508">(Jun 05 2018 at 12:37)</a>:</h4>
<p>that said</p>



<a name="127597509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597509">(Jun 05 2018 at 12:37)</a>:</h4>
<p>some of these diffs seem better for AST</p>



<a name="127597512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597512">(Jun 05 2018 at 12:37)</a>:</h4>
<p>getting <strong>exact</strong> matching on the spans is likely going to be a real rathole</p>



<a name="127597553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597553">(Jun 05 2018 at 12:38)</a>:</h4>
<p>ah, yes, definitely</p>



<a name="127597556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597556">(Jun 05 2018 at 12:38)</a>:</h4>
<p>and without exact matching on spans</p>



<a name="127597560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597560">(Jun 05 2018 at 12:38)</a>:</h4>
<p>I think achieving zero diff doesn't have to be a goal</p>



<a name="127597564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597564">(Jun 05 2018 at 12:38)</a>:</h4>
<p>its pointless to sweat about exact matching on wording</p>



<a name="127597566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597566">(Jun 05 2018 at 12:38)</a>:</h4>
<blockquote>
<p>cannot borrow data mutably in a <code>&amp;</code> reference</p>
</blockquote>



<a name="127597568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597568">(Jun 05 2018 at 12:38)</a>:</h4>
<p>that seems better for the AST</p>



<a name="127597570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597570">(Jun 05 2018 at 12:38)</a>:</h4>
<p>I definitely agree that the AST wording is better in some cases</p>



<a name="127597577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597577">(Jun 05 2018 at 12:38)</a>:</h4>
<p>hmm</p>



<a name="127597592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597592">(Jun 05 2018 at 12:39)</a>:</h4>
<blockquote>
<blockquote>
<p>cannot borrow data mutably in a <code>&amp;</code> reference</p>
</blockquote>
</blockquote>
<p>we can put that back. The NLL diagnostics were actually attempting to do this before</p>



<a name="127597595"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597595" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597595">(Jun 05 2018 at 12:39)</a>:</h4>
<p>but they were not doing it well and it was complicating the code</p>



<a name="127597596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597596">(Jun 05 2018 at 12:39)</a>:</h4>
<p>so I removed it</p>



<a name="127597597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597597">(Jun 05 2018 at 12:39)</a>:</h4>
<p>well</p>



<a name="127597601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597601">(Jun 05 2018 at 12:39)</a>:</h4>
<p>but after the cleanup</p>



<a name="127597602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597602">(Jun 05 2018 at 12:39)</a>:</h4>
<p>I also don't love it :)</p>



<a name="127597607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597607">(Jun 05 2018 at 12:39)</a>:</h4>
<p>it should be easier to come up with proper wording, I think</p>



<a name="127597611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597611">(Jun 05 2018 at 12:39)</a>:</h4>
<p>I lean towards this:</p>



<a name="127597614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597614">(Jun 05 2018 at 12:40)</a>:</h4>
<p>Oh, since I have your attention</p>



<a name="127597648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597648">(Jun 05 2018 at 12:40)</a>:</h4>
<p>we should not try to "blindly match"</p>



<a name="127597664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597664">(Jun 05 2018 at 12:40)</a>:</h4>
<p>rather, I think we should take some time and try to make "new and improved diagnostics" a feature too</p>



<a name="127597673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597673">(Jun 05 2018 at 12:40)</a>:</h4>
<p>but that's assuming it's not too much overhead</p>



<a name="127597683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597683">(Jun 05 2018 at 12:40)</a>:</h4>
<p>to track the diffs for now</p>



<a name="127597687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597687">(Jun 05 2018 at 12:40)</a>:</h4>
<p>What is the "right way" to find out if there was a user-written lifetime for a region on a <code>ty::TyRef</code> within <code>rustc_mir::borrow_check</code> ?</p>



<a name="127597692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597692">(Jun 05 2018 at 12:41)</a>:</h4>
<p>in particular we should mostly (for now) try to get it to the point where it's just wording</p>



<a name="127597705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597705">(Jun 05 2018 at 12:41)</a>:</h4>
<blockquote>
<p>in particular we should mostly (for now) try to get it to the point where it's just wording</p>
</blockquote>
<p>yes this is what I'm basically doing for now</p>



<a name="127597706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597706">(Jun 05 2018 at 12:41)</a>:</h4>
<p>because that's the "hard part"</p>



<a name="127597709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597709">(Jun 05 2018 at 12:41)</a>:</h4>
<p>we can delegate fine tuning</p>



<a name="127597711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597711">(Jun 05 2018 at 12:41)</a>:</h4>
<p>to arbitrary people</p>



<a name="127597882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597882">(Jun 05 2018 at 12:45)</a>:</h4>
<p>right</p>



<a name="127597888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597888">(Jun 05 2018 at 12:45)</a>:</h4>
<blockquote>
<p>What is the "right way" to find out if there was a user-written lifetime for a region on a <code>ty::TyRef</code> within <code>rustc_mir::borrow_check</code> ?</p>
</blockquote>
<p>I think there is no way to do that?</p>



<a name="127597892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597892">(Jun 05 2018 at 12:45)</a>:</h4>
<p>I mean this is the whole problem around user-written annotations, right?</p>



<a name="127597937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597937">(Jun 05 2018 at 12:46)</a>:</h4>
<p>I was thinking some more about it recently</p>



<a name="127597939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597939">(Jun 05 2018 at 12:46)</a>:</h4>
<p>hmm okay</p>



<a name="127597940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597940">(Jun 05 2018 at 12:46)</a>:</h4>
<p>maybe it'd be cool to not embed types <em>directly</em> into MIR</p>



<a name="127597942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597942">(Jun 05 2018 at 12:46)</a>:</h4>
<p>but rather via a kind of indirection</p>



<a name="127597945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597945">(Jun 05 2018 at 12:46)</a>:</h4>
<p>so that we can attach annotations to them</p>



<a name="127597950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597950">(Jun 05 2018 at 12:46)</a>:</h4>
<p>I'm already adding code to thread down the span of any explicit type provided for a local in the source</p>



<a name="127597955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597955">(Jun 05 2018 at 12:46)</a>:</h4>
<p>so that we can highlight <em>that</em> span instead of the span of the identifier</p>



<a name="127597971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597971">(Jun 05 2018 at 12:47)</a>:</h4>
<p>so I <em>could</em> similarly thread down information about the type itself, namely if it had an explicit lifetime parameter</p>



<a name="127597973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597973">(Jun 05 2018 at 12:47)</a>:</h4>
<p>that was actually also a use case I had in mind</p>



<a name="127597976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597976">(Jun 05 2018 at 12:47)</a>:</h4>
<p>I'm not sure how you could do that</p>



<a name="127597978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597978">(Jun 05 2018 at 12:47)</a>:</h4>
<p>the info is not in the MIR now</p>



<a name="127597981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597981">(Jun 05 2018 at 12:47)</a>:</h4>
<p>right</p>



<a name="127597986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597986">(Jun 05 2018 at 12:47)</a>:</h4>
<p>I'd have to add it</p>



<a name="127597992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127597992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127597992">(Jun 05 2018 at 12:47)</a>:</h4>
<p>but being able to add spans is exactly why I was thinking that maybe we should have the MIR have <code>TyIndex</code></p>



<a name="127598041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598041">(Jun 05 2018 at 12:48)</a>:</h4>
<p>alternatively, we could embed more than <code>Ty&lt;'tcx&gt;</code></p>



<a name="127598044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598044">(Jun 05 2018 at 12:48)</a>:</h4>
<p>Where <code>TyIndex</code> would be the indirection you mentioned above?</p>



<a name="127598051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598051">(Jun 05 2018 at 12:48)</a>:</h4>
<p>right, the idea would be that the MIR embeds a "Type index" and then we hvae a separate array of "Types" that maps each of those to various bits of info</p>



<a name="127598056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598056">(Jun 05 2018 at 12:48)</a>:</h4>
<p>e.g., span but maybe also the user-given version</p>



<a name="127598060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598060">(Jun 05 2018 at 12:48)</a>:</h4>
<p>(the canonicalized stuff)</p>



<a name="127598069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598069">(Jun 05 2018 at 12:49)</a>:</h4>
<p>I guess in some cases it could be a sparse mapping</p>



<a name="127598205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598205">(Jun 05 2018 at 12:51)</a>:</h4>
<p>Can I safely assume that we need not block the diagnostics work on such a change?</p>



<a name="127598212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598212">(Jun 05 2018 at 12:51)</a>:</h4>
<p>I wouldn't block on it, but it maybe something we want to think about</p>



<a name="127598219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598219">(Jun 05 2018 at 12:51)</a>:</h4>
<p>e.g. I should feel free in the short term to just make do adding <code>Option&lt;TySourceStuff&gt;</code> to <code>LocalDecl</code></p>



<a name="127598226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598226">(Jun 05 2018 at 12:51)</a>:</h4>
<p>yes I agree we should think about it.</p>



<a name="127598271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598271">(Jun 05 2018 at 12:52)</a>:</h4>
<p>that seems ok</p>



<a name="127598317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598317">(Jun 05 2018 at 12:53)</a>:</h4>
<p>also</p>



<a name="127598323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598323">(Jun 05 2018 at 12:53)</a>:</h4>
<p>since I still have your attention (maybe)</p>



<a name="127598335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598335">(Jun 05 2018 at 12:53)</a>:</h4>
<p>If I wanted to add the NodeId to this <code>TySourceStuff</code></p>



<a name="127598340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598340">(Jun 05 2018 at 12:53)</a>:</h4>
<p>doing so blindly seems to break DepInfo</p>



<a name="127598389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598389">(Jun 05 2018 at 12:54)</a>:</h4>
<p>is that something where I need to not use the <code>impl_stable_hash!</code> macro?</p>



<a name="127598405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598405">(Jun 05 2018 at 12:54)</a>:</h4>
<p>and instead write the impl explicitly and make it not include the <code>NodeId</code> in the hash it computes?</p>



<a name="127598409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598409">(Jun 05 2018 at 12:54)</a>:</h4>
<p>you should not add the node-id</p>



<a name="127598411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598411">(Jun 05 2018 at 12:54)</a>:</h4>
<p>under any circumstances :)</p>



<a name="127598412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598412">(Jun 05 2018 at 12:54)</a>:</h4>
<p>That is the other answer I was expecting. :)</p>



<a name="127598415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598415">(Jun 05 2018 at 12:54)</a>:</h4>
<p>okay</p>



<a name="127598417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598417">(Jun 05 2018 at 12:54)</a>:</h4>
<p>I don't mind that</p>



<a name="127598424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598424">(Jun 05 2018 at 12:54)</a>:</h4>
<p>you could maybe add the <code>HirId</code></p>



<a name="127598439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598439">(Jun 05 2018 at 12:55)</a>:</h4>
<p>though .. I'd sort of prefer to avoid it ...</p>



<a name="127598442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598442">(Jun 05 2018 at 12:55)</a>:</h4>
<p>It just means I cannot e.g. put in <code>Option&lt;ast::Ty&gt;</code> as the <code>Option&lt;TySourceStuff&gt;</code></p>



<a name="127598444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598444">(Jun 05 2018 at 12:55)</a>:</h4>
<p>mostly because I'd rather MIR is a standalone IR</p>



<a name="127598453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598453">(Jun 05 2018 at 12:55)</a>:</h4>
<p>oh dear god no</p>



<a name="127598458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598458">(Jun 05 2018 at 12:55)</a>:</h4>
<p>but I guess you meant <code>hir::</code>?</p>



<a name="127598461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598461">(Jun 05 2018 at 12:55)</a>:</h4>
<p>I dont think I mean <code>hir::</code></p>



<a name="127598468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598468">(Jun 05 2018 at 12:55)</a>:</h4>
<p>well I think we've thrown away the AST by this time</p>



<a name="127598469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598469">(Jun 05 2018 at 12:55)</a>:</h4>
<p>unless that does carry the user-written name for the liftime?</p>



<a name="127598471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598471">(Jun 05 2018 at 12:55)</a>:</h4>
<p>so it would be hard to use that</p>



<a name="127598474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598474">(Jun 05 2018 at 12:55)</a>:</h4>
<p>let me go check</p>



<a name="127598475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598475">(Jun 05 2018 at 12:55)</a>:</h4>
<p>in any case we <em>should</em> throw it away</p>



<a name="127598521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598521">(Jun 05 2018 at 12:56)</a>:</h4>
<p>HIR does carry the info but I think it's the wrong thing to use</p>



<a name="127598522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598522">(Jun 05 2018 at 12:56)</a>:</h4>
<p>we already <em>have</em> the info you want</p>



<a name="127598526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598526">(Jun 05 2018 at 12:56)</a>:</h4>
<p>in the <code>UserAssertTy</code> declarations</p>



<a name="127598529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598529">(Jun 05 2018 at 12:56)</a>:</h4>
<p>oh it does have a name</p>



<a name="127598531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598531">(Jun 05 2018 at 12:56)</a>:</h4>
<p>maybe you should move those into <code>LocalDecl</code></p>



<a name="127598536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598536">(Jun 05 2018 at 12:56)</a>:</h4>
<p>or, I don't <em>know</em> if it's the wrong thing I guess</p>



<a name="127598542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598542">(Jun 05 2018 at 12:56)</a>:</h4>
<p>but it's not obviously the right thing</p>



<a name="127598546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598546">(Jun 05 2018 at 12:56)</a>:</h4>
<p>so use a <code>Option&lt;CanonicalTy&gt;</code> in the <code>LocalDecl</code>, let me see...</p>



<a name="127598547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598547">(Jun 05 2018 at 12:56)</a>:</h4>
<p>I guess it depends on what we want to underline though</p>



<a name="127598555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598555">(Jun 05 2018 at 12:57)</a>:</h4>
<p>in particular, the HIR gives much finer-grained span info</p>



<a name="127598558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598558">(Jun 05 2018 at 12:57)</a>:</h4>
<p>so maybe you <em>do</em> want that</p>



<a name="127598564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598564">(Jun 05 2018 at 12:57)</a>:</h4>
<p>but interpreting it can be sort of non-trivial</p>



<a name="127598572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598572">(Jun 05 2018 at 12:57)</a>:</h4>
<p>what msg are you trying to emulate exactly?</p>



<a name="127598636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598636">(Jun 05 2018 at 12:58)</a>:</h4>
<p>right now we always suggest types like <code>&amp;mut Foo</code></p>



<a name="127598647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598647">(Jun 05 2018 at 12:58)</a>:</h4>
<p>when the user had written <code>&amp;Foo</code> or <code>&amp;'a Foo</code></p>



<a name="127598653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598653">(Jun 05 2018 at 12:58)</a>:</h4>
<p>so I'm trying to get it to suggest <code>&amp;'a mut Foo</code></p>



<a name="127598655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598655">(Jun 05 2018 at 12:58)</a>:</h4>
<p>ah</p>



<a name="127598658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598658">(Jun 05 2018 at 12:58)</a>:</h4>
<p>how does AST borrowck do that?</p>



<a name="127598659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598659">(Jun 05 2018 at 12:58)</a>:</h4>
<p>let me go see</p>



<a name="127598776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598776">(Jun 05 2018 at 13:01)</a>:</h4>
<p>hmm</p>



<a name="127598781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598781">(Jun 05 2018 at 13:01)</a>:</h4>
<p><code>self.tcx.sess.codemap().span_to_snippet(lifetime.span)</code></p>



<a name="127598829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598829">(Jun 05 2018 at 13:02)</a>:</h4>
<p>specifically in: <a href="https://github.com/rust-lang/rust/blob/f9157f5b869fdb14308eaf6778d01ee3d0e1268a/src/librustc_borrowck/borrowck/mod.rs#L1131" target="_blank" title="https://github.com/rust-lang/rust/blob/f9157f5b869fdb14308eaf6778d01ee3d0e1268a/src/librustc_borrowck/borrowck/mod.rs#L1131">https://github.com/rust-lang/rust/blob/f9157f5b869fdb14308eaf6778d01ee3d0e1268a/src/librustc_borrowck/borrowck/mod.rs#L1131</a></p>



<a name="127598841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598841">(Jun 05 2018 at 13:02)</a>:</h4>
<p>(and its getting the <code>lifetime</code> off of the <code>hir::TyRptr</code>)</p>



<a name="127598856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598856">(Jun 05 2018 at 13:03)</a>:</h4>
<p>ok</p>



<a name="127598861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598861">(Jun 05 2018 at 13:03)</a>:</h4>
<p>so I think <code>HirId</code> is ok</p>



<a name="127598865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598865">(Jun 05 2018 at 13:03)</a>:</h4>
<p>that should be hashable too</p>



<a name="127598869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598869">(Jun 05 2018 at 13:03)</a>:</h4>
<p>in general NodeId is deprecated</p>



<a name="127598872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127598872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127598872">(Jun 05 2018 at 13:04)</a>:</h4>
<p>though it's been one of those long, slow deprecations</p>



<a name="127599022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599022">(Jun 05 2018 at 13:06)</a>:</h4>
<p>okay. I'll try passing down a <code>HirId</code> instead of a <code>Span</code> then</p>



<a name="127599030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599030">(Jun 05 2018 at 13:06)</a>:</h4>
<p>and see whether I can reconstruct everything I need from that.</p>



<a name="127599052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599052">(Jun 05 2018 at 13:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> you can convert one to a <code>NodeId</code>, still sadly needed much of the time</p>



<a name="127599058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599058">(Jun 05 2018 at 13:07)</a>:</h4>
<p>okay</p>



<a name="127599126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599126">(Jun 05 2018 at 13:08)</a>:</h4>
<p>sorry for my ignorance here</p>



<a name="127599128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599128">(Jun 05 2018 at 13:08)</a>:</h4>
<p>but</p>



<a name="127599141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599141">(Jun 05 2018 at 13:09)</a>:</h4>
<p>but I was adding <code>ty_span: Span</code> field to <code>hir::Arg</code></p>



<a name="127599143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599143">(Jun 05 2018 at 13:09)</a>:</h4>
<p>as part of the threading</p>



<a name="127599147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599147">(Jun 05 2018 at 13:09)</a>:</h4>
<p>down of information</p>



<a name="127599161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599161">(Jun 05 2018 at 13:09)</a>:</h4>
<p><code>hir::Arg</code> already carries a <code>hir_id: HirId</code>, presumably the <code>id</code> of the <code>Arg</code> itself in the map</p>



<a name="127599214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599214">(Jun 05 2018 at 13:10)</a>:</h4>
<p>is there a way to map that arg's <code>hir_id</code> to the <code>HirId</code> of the type, if any, attached to that arg?</p>



<a name="127599232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599232">(Jun 05 2018 at 13:11)</a>:</h4>
<p>Or in other words: Would an attempt in the PR to add <code>ty_id: HirId</code> to <code>Arg</code> be instantly be "r-'ed"  with a note saying "don't do this; use this map over here instead."</p>



<a name="127599259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599259">(Jun 05 2018 at 13:11)</a>:</h4>
<p>hmm.</p>



<a name="127599305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599305">(Jun 05 2018 at 13:12)</a>:</h4>
<p>I guess they are found in the <code>FnDecl</code> <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc/hir/struct.FnDecl.html" target="_blank" title="https://doc.rust-lang.org/nightly/nightly-rustc/rustc/hir/struct.FnDecl.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustc/hir/struct.FnDecl.html</a></p>



<a name="127599308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599308">(Jun 05 2018 at 13:12)</a>:</h4>
<p>I think that's because of incremental etc</p>



<a name="127599310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599310">(Jun 05 2018 at 13:12)</a>:</h4>
<p>i.e., we wanted to separate out the "fn-local part of it"</p>



<a name="127599312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599312">(Jun 05 2018 at 13:12)</a>:</h4>
<p>from the "interface part"</p>



<a name="127599337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599337">(Jun 05 2018 at 13:13)</a>:</h4>
<p>hmm did I overlook trying to use the <code>hir::Ty</code>'s there ..</p>



<a name="127599341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599341">(Jun 05 2018 at 13:13)</a>:</h4>
<p>I would imagine you could have the <code>DefId</code> for the corresponding fn on hand, and could fetch the <code>FnDecl</code> — you'd have to know the index of the argument</p>



<a name="127599353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599353">(Jun 05 2018 at 13:13)</a>:</h4>
<p>in any case, <code>hir::Ty</code> of course <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc/hir/struct.Ty.html#structfield.hir_id" target="_blank" title="https://doc.rust-lang.org/nightly/nightly-rustc/rustc/hir/struct.Ty.html#structfield.hir_id">also has a <code>HirId</code></a></p>



<a name="127599403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599403">(Jun 05 2018 at 13:14)</a>:</h4>
<p>right, I just wanted to get my hands on the <code>hir::Ty</code> itself or a <code>HirId</code> for the <code>hir::Ty</code></p>



<a name="127599411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599411">(Jun 05 2018 at 13:14)</a>:</h4>
<p>in the context of some code that is enumerating over a series of <code>hir::Arg</code></p>



<a name="127599413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599413">(Jun 05 2018 at 13:14)</a>:</h4>
<p>yeah it seems like that is not convenient</p>



<a name="127599418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599418">(Jun 05 2018 at 13:14)</a>:</h4>
<p>but I need to double check</p>



<a name="127599423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599423">(Jun 05 2018 at 13:15)</a>:</h4>
<p>my preference would be to have that code enumerate over a series of <code>(hir::Arg, hir::Ty)</code> pairs</p>



<a name="127599425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599425">(Jun 05 2018 at 13:15)</a>:</h4>
<p>I may have simply overlooked the fact that the <code>hir::Ty</code> was also availalbe to cosnult</p>



<a name="127599430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599430">(Jun 05 2018 at 13:15)</a>:</h4>
<p>which would require fetching the <code>FnDecl</code> etc</p>



<a name="127599431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599431">(Jun 05 2018 at 13:15)</a>:</h4>
<p>I suspect it has enough context</p>



<a name="127599433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599433">(Jun 05 2018 at 13:15)</a>:</h4>
<p>and/or already has its hands on the <code>FnDecl</code></p>



<a name="127599501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599501">(Jun 05 2018 at 13:16)</a>:</h4>
<p>this is context: <a href="https://github.com/rust-lang/rust/blob/30cae5870907e7ae9e74a39eee5bcf55ee5d2809/src/librustc_mir/build/mod.rs#L89" target="_blank" title="https://github.com/rust-lang/rust/blob/30cae5870907e7ae9e74a39eee5bcf55ee5d2809/src/librustc_mir/build/mod.rs#L89">https://github.com/rust-lang/rust/blob/30cae5870907e7ae9e74a39eee5bcf55ee5d2809/src/librustc_mir/build/mod.rs#L89</a></p>



<a name="127599504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599504">(Jun 05 2018 at 13:16)</a>:</h4>
<p>I know from prior work in past few days</p>



<a name="127599510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599510">(Jun 05 2018 at 13:17)</a>:</h4>
<p>yeah so it has everything it needs</p>



<a name="127599512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599512">(Jun 05 2018 at 13:17)</a>:</h4>
<p>that I should be able to extract the <code>FnDecl</code></p>



<a name="127599516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599516">(Jun 05 2018 at 13:17)</a>:</h4>
<p>it doesn't already have the <code>FnDecl</code>; the <code>fn_sig</code> there is different</p>



<a name="127599522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599522">(Jun 05 2018 at 13:17)</a>:</h4>
<p>though it might be a bit of a pain</p>



<a name="127599525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599525">(Jun 05 2018 at 13:17)</a>:</h4>
<p>well, it has everything "in principle" :)</p>



<a name="127599532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599532">(Jun 05 2018 at 13:17)</a>:</h4>
<p>Yeah. I had to add some code to lookup an <code>FnDecl</code> from a body's owner</p>



<a name="127599534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599534">(Jun 05 2018 at 13:18)</a>:</h4>
<p>I wonder if e.g. closures will cause you pain here</p>



<a name="127599573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599573">(Jun 05 2018 at 13:18)</a>:</h4>
<p>it seems like it would be ok</p>



<a name="127599575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599575">(Jun 05 2018 at 13:18)</a>:</h4>
<p>to add to <code>hir::Arg</code> the <code>HirId</code> of the type</p>



<a name="127599577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599577">(Jun 05 2018 at 13:18)</a>:</h4>
<p>thinking on it a bit more</p>



<a name="127599578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599578">(Jun 05 2018 at 13:18)</a>:</h4>
<p>(or an <code>Option&lt;FnDecl&gt;</code>, I guess. Can't remember. )</p>



<a name="127599579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599579">(Jun 05 2018 at 13:18)</a>:</h4>
<p>what you really <em>don't</em> want is info flow the other way</p>



<a name="127599584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599584">(Jun 05 2018 at 13:18)</a>:</h4>
<p>what do you mean by info flow the other way?</p>



<a name="127599587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599587">(Jun 05 2018 at 13:18)</a>:</h4>
<p>but if the type changes, code using the <code>Arg</code> is gonna have to be recompiled</p>



<a name="127599593"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599593" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599593">(Jun 05 2018 at 13:18)</a>:</h4>
<p>I mean that if the <code>hir::Ty</code> embedded patterns and stuff</p>



<a name="127599594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599594">(Jun 05 2018 at 13:19)</a>:</h4>
<p>ah</p>



<a name="127599597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599597">(Jun 05 2018 at 13:19)</a>:</h4>
<p>er, not the <code>hir::Ty</code> but the <code>hir::FnDecl</code></p>



<a name="127599604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599604">(Jun 05 2018 at 13:19)</a>:</h4>
<p>oka yes</p>



<a name="127599609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599609">(Jun 05 2018 at 13:19)</a>:</h4>
<p>things that are details of the implementation of the <code>fn</code> body</p>



<a name="127599610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599610">(Jun 05 2018 at 13:19)</a>:</h4>
<p>i am also influenced by all the various forms functions and methods can take in the HIR</p>



<a name="127599616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599616">(Jun 05 2018 at 13:19)</a>:</h4>
<p>should not leak out into the <code>hir::FnDecl</code></p>



<a name="127599619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599619">(Jun 05 2018 at 13:19)</a>:</h4>
<p>they probably all do have a <code>FnDecl</code> hiding somewhere</p>



<a name="127599622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599622">(Jun 05 2018 at 13:19)</a>:</h4>
<p>but at minimum you'd have to do a bunch of mapping to get it, right?</p>



<a name="127599624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599624">(Jun 05 2018 at 13:19)</a>:</h4>
<p>or else write a helper in the hir map</p>



<a name="127599707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599707">(Jun 05 2018 at 13:21)</a>:</h4>
<blockquote>
<p>or else write a helper in the hir map</p>
</blockquote>
<p>yeah that's what I did</p>



<a name="127599723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599723">(Jun 05 2018 at 13:21)</a>:</h4>
<p>k,  that also seems fine</p>



<a name="127599727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599727">(Jun 05 2018 at 13:21)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/51275/files#diff-2611048bb760f028c808ed4a14b07c00R173" target="_blank" title="https://github.com/rust-lang/rust/pull/51275/files#diff-2611048bb760f028c808ed4a14b07c00R173">https://github.com/rust-lang/rust/pull/51275/files#diff-2611048bb760f028c808ed4a14b07c00R173</a></p>



<a name="127599775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599775">(Jun 05 2018 at 13:22)</a>:</h4>
<p>it's times like these I wish we had made progress on "virtual structs"</p>



<a name="127599777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127599777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127599777">(Jun 05 2018 at 13:22)</a>:</h4>
<p>such a pain</p>



<a name="127671424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127671424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127671424">(Jun 06 2018 at 18:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> oh, and... which diagnostic issue were you working on again?</p>



<a name="127671859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127671859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127671859">(Jun 06 2018 at 18:57)</a>:</h4>
<p>I had this <a href="https://github.com/rust-lang/rust/issues/51195" target="_blank" title="https://github.com/rust-lang/rust/issues/51195">https://github.com/rust-lang/rust/issues/51195</a> one pending</p>



<a name="127671865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127671865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127671865">(Jun 06 2018 at 18:58)</a>:</h4>
<p>didn't do any work yet</p>



<a name="127674464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127674464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127674464">(Jun 06 2018 at 19:52)</a>:</h4>
<p>ok, let me know if you want any tips, but I basically think my plan there would be to examine <em>when</em> each msg is printed. My theory is that they are printed in basic block order, which is semi-arbitrary.</p>



<a name="127674468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127674468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127674468">(Jun 06 2018 at 19:52)</a>:</h4>
<p>and that we should just iterate over the basic blocks in a distinct order (I'd guess RPO)</p>



<a name="127676799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127676799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127676799">(Jun 06 2018 at 20:40)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> interesting. So the same change might fix both rust-lang/rust#51195 and rust-lang/rust#51167 ?</p>



<a name="127676804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127676804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127676804">(Jun 06 2018 at 20:40)</a>:</h4>
<p>oh shoot</p>



<a name="127676809"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127676809" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127676809">(Jun 06 2018 at 20:40)</a>:</h4>
<p>no I think I was mixing them up maybe</p>



<a name="127677431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127677431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127677431">(Jun 06 2018 at 20:53)</a>:</h4>
<p>(I definitely think we should prioritize the RPO experiment.)</p>



<a name="127681860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127681860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127681860">(Jun 06 2018 at 22:20)</a>:</h4>
<p>Hmm. Been playing around with fixing <a href="https://github.com/rust-lang/rust/issues/51191" target="_blank" title="https://github.com/rust-lang/rust/issues/51191">rust-lang/rust#51191</a> but I'm starting to wonder if this is a diagnostic that may do more harm than good?</p>



<a name="127681870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127681870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127681870">(Jun 06 2018 at 22:21)</a>:</h4>
<p>ah well I guess we can revisit the "should we actually do this?" later</p>



<a name="127727697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127727697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127727697">(Jun 07 2018 at 16:56)</a>:</h4>
<blockquote>
<p>ok, let me know if you want any tips, but I basically think my plan there would be to examine <em>when</em> each msg is printed. My theory is that they are printed in basic block order, which is semi-arbitrary.</p>
</blockquote>
<p>I'm not sure I understood what you meant here</p>



<a name="127727724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127727724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127727724">(Jun 07 2018 at 16:57)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> isn't the issue talking about a note that is not printed?, why is that related to the order of things that are printed?</p>



<a name="127727774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127727774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127727774">(Jun 07 2018 at 16:58)</a>:</h4>
<p>/cc <span class="user-mention" data-user-id="116083">@pnkfelix</span></p>



<a name="127747941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127747941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127747941">(Jun 08 2018 at 01:07)</a>:</h4>
<p>I think <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> I may have been mixing up two issues</p>



<a name="127749386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127749386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127749386">(Jun 08 2018 at 01:49)</a>:</h4>
<p><span class="emoji emoji-1f44d" title="thumbs up">:thumbs_up:</span></p>



<a name="127790081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790081">(Jun 08 2018 at 19:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> what's the connection between src/librustc_mir/borrow_check/error_reporting.rs and src/librustc_mir/util/borrowck_errors.rs ?</p>



<a name="127790195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790195">(Jun 08 2018 at 19:50)</a>:</h4>
<p>got me :)</p>



<a name="127790220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790220">(Jun 08 2018 at 19:51)</a>:</h4>
<p>it looks like there is some setup to let HIR and MIR borrowck share code</p>



<a name="127790233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790233">(Jun 08 2018 at 19:51)</a>:</h4>
<p>but there's reporting in both</p>



<a name="127790235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790235">(Jun 08 2018 at 19:51)</a>:</h4>
<p>so ...</p>



<a name="127790285"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790285" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790285">(Jun 08 2018 at 19:52)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/util/borrowck_errors.rs#L427" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/util/borrowck_errors.rs#L427">https://github.com/rust-lang/rust/blob/master/src/librustc_mir/util/borrowck_errors.rs#L427</a></p>



<a name="127790305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790305">(Jun 08 2018 at 19:53)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/borrow_check/error_reporting.rs#L493" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/borrow_check/error_reporting.rs#L493">https://github.com/rust-lang/rust/blob/master/src/librustc_mir/borrow_check/error_reporting.rs#L493</a></p>



<a name="127790310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790310">(Jun 08 2018 at 19:53)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/borrow_check/error_reporting.rs#L544" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/borrow_check/error_reporting.rs#L544">https://github.com/rust-lang/rust/blob/master/src/librustc_mir/borrow_check/error_reporting.rs#L544</a></p>



<a name="127790377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790377">(Jun 08 2018 at 19:54)</a>:</h4>
<p>last two ok</p>



<a name="127790379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790379">(Jun 08 2018 at 19:54)</a>:</h4>
<p>the one in <a href="http://borrowck_errors.rs" target="_blank" title="http://borrowck_errors.rs">borrowck_errors.rs</a> unsure what's about</p>



<a name="127790401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790401">(Jun 08 2018 at 19:55)</a>:</h4>
<p>well, I see this:</p>
<div class="codehilite"><pre><span></span>&gt; /home/nmatsakis/.cargo/bin/rg --no-heading --color never <span class="s1">&#39;path_does_not_live_long_enough&#39;</span>
src/librustc_borrowck/borrowck/mod.rs:913:                <span class="nb">let</span> mut <span class="nv">db</span> <span class="o">=</span> self.path_does_not_live_long_enough<span class="o">(</span>error_span, <span class="p">&amp;</span>msg, Origin::Ast<span class="o">)</span><span class="p">;</span>
src/librustc_mir/borrow_check/error_reporting.rs:492:            tcx.path_does_not_live_long_enough<span class="o">(</span>borrow_span, <span class="p">&amp;</span>format!<span class="o">(</span><span class="s2">&quot;`{}`&quot;</span>, name<span class="o">)</span>, Origin::Mir<span class="o">)</span><span class="p">;</span>
src/librustc_mir/borrow_check/error_reporting.rs:513:            tcx.path_does_not_live_long_enough<span class="o">(</span>proper_span, <span class="s2">&quot;borrowed value&quot;</span>, Origin::Mir<span class="o">)</span><span class="p">;</span>
src/librustc_mir/borrow_check/error_reporting.rs:543:            tcx.path_does_not_live_long_enough<span class="o">(</span>borrow_span, <span class="p">&amp;</span>format!<span class="o">(</span><span class="s2">&quot;`{}`&quot;</span>, name<span class="o">)</span>, Origin::Mir<span class="o">)</span><span class="p">;</span>
src/librustc_mir/borrow_check/error_reporting.rs:569:            tcx.path_does_not_live_long_enough<span class="o">(</span>proper_span, <span class="s2">&quot;borrowed value&quot;</span>, Origin::Mir<span class="o">)</span><span class="p">;</span>
src/librustc_mir/util/borrowck_errors.rs:421:    fn path_does_not_live_long_enough<span class="o">(</span>self,
</pre></div>



<a name="127790460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790460">(Jun 08 2018 at 19:56)</a>:</h4>
<p>ahh ok</p>



<a name="127790464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790464">(Jun 08 2018 at 19:56)</a>:</h4>
<p>that makes sense</p>



<a name="127790465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790465">(Jun 08 2018 at 19:56)</a>:</h4>
<p>oh, I see, <code>rustc_borrowck</code> depends on <code>rustc_mir</code></p>



<a name="127790468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790468">(Jun 08 2018 at 19:56)</a>:</h4>
<p>/me did not expect that</p>



<a name="127790476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790476">(Jun 08 2018 at 19:56)</a>:</h4>
<p>I suspect in part it's a bit chaotic</p>



<a name="127790479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790479">(Jun 08 2018 at 19:56)</a>:</h4>
<p>and not well organized</p>



<a name="127790490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790490">(Jun 08 2018 at 19:57)</a>:</h4>
<p>so ... if this is for code reuse I got it</p>



<a name="127790494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790494">(Jun 08 2018 at 19:57)</a>:</h4>
<p>but basically <code>borrowck_errors.rs</code> is a way to share code yeah</p>



<a name="127790504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790504">(Jun 08 2018 at 19:57)</a>:</h4>
<p>but seems like src/librustc_mir/borrow_check/error_reporting.rs is not reusing then?</p>



<a name="127790505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127790505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127790505">(Jun 08 2018 at 19:57)</a>:</h4>
<p>but I wouldn't be surprised if we also wound up with some duplication</p>



<a name="127793088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127793088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127793088">(Jun 08 2018 at 20:59)</a>:</h4>
<div class="codehilite"><pre><span></span>[santiago@archlinux rust1 (diagnostic-suggest-drop-in-reverse)]$ rustc +stage1 -Zborrowck=mir src/test/ui/error-codes/E0597.rs
error[E0597]: `y` does not live long enough
  --&gt; src/test/ui/error-codes/E0597.rs:18:16
   |
18 |     x.x = Some(&amp;y);
   |                ^^ borrowed value does not live long enough
19 |     //~^ `y` does not live long enough [E0597]
20 | }
   | -
   | |
   | borrowed value only lives until here
   | borrow later used here, when `x` is dropped
   |
   = note: values in a scope are dropped in the opposite order they are defined 3
   = note: values in a scope are dropped in the opposite order they are defined 2

error: aborting due to previous error

For more information about this error, try `rustc --explain E0597`.
</pre></div>



<a name="127793152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127793152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127793152">(Jun 08 2018 at 21:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="emoji emoji-261d" title="point up">:point_up:</span></p>



<a name="127793157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127793157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127793157">(Jun 08 2018 at 21:00)</a>:</h4>
<p>you can see what are <code>3</code> and <code>2</code> here ...</p>



<a name="127793167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127793167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127793167">(Jun 08 2018 at 21:00)</a>:</h4>
<div class="codehilite"><pre><span></span>[santiago@archlinux rust1 (diagnostic-suggest-drop-in-reverse)]$ git diff
diff --git a/src/librustc_mir/borrow_check/error_reporting.rs b/src/librustc_mir/borrow_check/error_reporting.rs
index 9061af1b68..e8e6eadddb 100644
--- a/src/librustc_mir/borrow_check/error_reporting.rs
+++ b/src/librustc_mir/borrow_check/error_reporting.rs
@@ -496,6 +496,8 @@ impl&lt;&#39;cx, &#39;gcx, &#39;tcx&gt; MirBorrowckCtxt&lt;&#39;cx, &#39;gcx, &#39;tcx&gt; {
             format!(&quot;`{}` dropped here while still borrowed&quot;, name),
         );
         self.explain_why_borrow_contains_point(context, borrow, &amp;mut err);
+        err.note(&quot;values in a scope are dropped in the opposite order \
+                  they are defined 1&quot;);
         err.emit();
     }

@@ -545,6 +547,9 @@ impl&lt;&#39;cx, &#39;gcx, &#39;tcx&gt; MirBorrowckCtxt&lt;&#39;cx, &#39;gcx, &#39;tcx&gt; {
         err.span_label(drop_span, &quot;borrowed value only lives until here&quot;);

         self.explain_why_borrow_contains_point(context, borrow, &amp;mut err);
+
+        err.note(&quot;values in a scope are dropped in the opposite order \
+                  they are defined 2&quot;);
         err.emit();
     }

diff --git a/src/librustc_mir/util/borrowck_errors.rs b/src/librustc_mir/util/borrowck_errors.rs
index d6b3e674f8..85726648b0 100644
--- a/src/librustc_mir/util/borrowck_errors.rs
+++ b/src/librustc_mir/util/borrowck_errors.rs
@@ -424,9 +424,12 @@ pub trait BorrowckErrors&lt;&#39;cx&gt;: Sized + Copy {
                                       o: Origin)
                                       -&gt; DiagnosticBuilder&lt;&#39;cx&gt;
     {
-        let err = struct_span_err!(self, span, E0597, &quot;{} does not live long enough{OGN}&quot;,
+        let mut err = struct_span_err!(self, span, E0597, &quot;{} does not live long enough{OGN}&quot;,
                                    path, OGN=o);

+        err.note(&quot;values in a scope are dropped in the opposite order \
+                  they are defined 3&quot;);
+
         self.cancel_if_wrong_origin(err, o)
     }

 ```
</pre></div>



<a name="127793172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127793172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127793172">(Jun 08 2018 at 21:01)</a>:</h4>
<p>I'm confused what I am looking at</p>



<a name="127793181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127793181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127793181">(Jun 08 2018 at 21:01)</a>:</h4>
<p>ah ok</p>



<a name="127793183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127793183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127793183">(Jun 08 2018 at 21:01)</a>:</h4>
<p>both execute</p>



<a name="127793200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127793200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127793200">(Jun 08 2018 at 21:01)</a>:</h4>
<p>uh.. oookay :)</p>



<a name="127793246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127793246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127793246">(Jun 08 2018 at 21:02)</a>:</h4>
<p>well probably the latter one (<code>util</code>) creates the <code>err</code></p>



<a name="127793247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127793247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127793247">(Jun 08 2018 at 21:02)</a>:</h4>
<p>hehe</p>



<a name="127793249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127793249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127793249">(Jun 08 2018 at 21:02)</a>:</h4>
<p>and then returns it to the other one?</p>



<a name="127793273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127793273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127793273">(Jun 08 2018 at 21:02)</a>:</h4>
<p>unsure ... checking</p>



<a name="127796135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127796135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127796135">(Jun 08 2018 at 22:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> about this issue</p>



<a name="127796136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127796136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127796136">(Jun 08 2018 at 22:10)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/2e104a77cfb6b83f725512210c88dc970426a354/src/test/ui/error-codes/E0597.rs" target="_blank" title="https://github.com/rust-lang/rust/blob/2e104a77cfb6b83f725512210c88dc970426a354/src/test/ui/error-codes/E0597.rs">https://github.com/rust-lang/rust/blob/2e104a77cfb6b83f725512210c88dc970426a354/src/test/ui/error-codes/E0597.rs</a></p>



<a name="127796144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127796144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127796144">(Jun 08 2018 at 22:11)</a>:</h4>
<p>this happens when you assign to a field of a local a borrow of another local</p>



<a name="127796148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127796148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127796148">(Jun 08 2018 at 22:11)</a>:</h4>
<p>so ...</p>



<a name="127796201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127796201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127796201">(Jun 08 2018 at 22:12)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/2e104a77cfb6b83f725512210c88dc970426a354/src/librustc_mir/borrow_check/error_reporting.rs#L519" target="_blank" title="https://github.com/rust-lang/rust/blob/2e104a77cfb6b83f725512210c88dc970426a354/src/librustc_mir/borrow_check/error_reporting.rs#L519">https://github.com/rust-lang/rust/blob/2e104a77cfb6b83f725512210c88dc970426a354/src/librustc_mir/borrow_check/error_reporting.rs#L519</a></p>



<a name="127796205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127796205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127796205">(Jun 08 2018 at 22:12)</a>:</h4>
<p>adding a call to note here with the text ends up firing way more than I want</p>



<a name="127796284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127796284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127796284">(Jun 08 2018 at 22:15)</a>:</h4>
<p>like <a href="https://github.com/rust-lang/rust/blob/2e104a77cfb6b83f725512210c88dc970426a354/src/test/ui/issue-46471.rs" target="_blank" title="https://github.com/rust-lang/rust/blob/2e104a77cfb6b83f725512210c88dc970426a354/src/test/ui/issue-46471.rs">https://github.com/rust-lang/rust/blob/2e104a77cfb6b83f725512210c88dc970426a354/src/test/ui/issue-46471.rs</a> and a lot more</p>



<a name="127796334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127796334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127796334">(Jun 08 2018 at 22:16)</a>:</h4>
<p>I need to check if this is when assigning to a field of a local a borrow of another local</p>



<a name="127796343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127796343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127796343">(Jun 08 2018 at 22:16)</a>:</h4>
<p>maybe that's something I can get from BorrowData?</p>



<a name="127796776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127796776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127796776">(Jun 08 2018 at 22:28)</a>:</h4>
<p>will try to continue tomorrow or on monday</p>



<a name="127799027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127799027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127799027">(Jun 08 2018 at 23:36)</a>:</h4>
<p>maybe checking that <code>borrow.borrowed_place</code> and <code>borrow.assigned_place</code> are <code>Place::Local</code> ?</p>



<a name="127800888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127800888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127800888">(Jun 09 2018 at 00:40)</a>:</h4>
<blockquote>
<p>I need to check if this is when assigning to a field of a local a borrow of another local</p>
</blockquote>
<p>Yeah I was afraid of that</p>



<a name="127800891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127800891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127800891">(Jun 09 2018 at 00:40)</a>:</h4>
<p>let me take a look at the original</p>



<a name="127800893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127800893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127800893">(Jun 09 2018 at 00:40)</a>:</h4>
<p>this could be a bit trickier in MIR than in AST land</p>



<a name="127800895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127800895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127800895">(Jun 09 2018 at 00:40)</a>:</h4>
<p>I think though</p>



<a name="127800898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127800898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127800898">(Jun 09 2018 at 00:40)</a>:</h4>
<p>we might want to approach this a slightly different way, also</p>



<a name="127800904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127800904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127800904">(Jun 09 2018 at 00:41)</a>:</h4>
<p>like maybe we don't want to issue <em>precisely</em> the same message, but we can get a similar point across</p>



<a name="127800915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127800915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127800915">(Jun 09 2018 at 00:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> what is the actual example again? (Which is the issue # again?)</p>



<a name="127800961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127800961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127800961">(Jun 09 2018 at 00:42)</a>:</h4>
<p>ok, I see it's <a href="https://github.com/rust-lang/rust/issues/51195" target="_blank" title="https://github.com/rust-lang/rust/issues/51195">https://github.com/rust-lang/rust/issues/51195</a>...</p>



<a name="127800964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/127800964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#127800964">(Jun 09 2018 at 00:42)</a>:</h4>
<p>I'm gonna open a new topic instead of this general purpose one =)</p>



<a name="128373029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128373029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128373029">(Jun 20 2018 at 17:23)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/51651" target="_blank" title="https://github.com/rust-lang/rust/pull/51651">https://github.com/rust-lang/rust/pull/51651</a> &amp; <a href="https://github.com/rust-lang/rust/pull/51638" target="_blank" title="https://github.com/rust-lang/rust/pull/51638">https://github.com/rust-lang/rust/pull/51638</a> were merged</p>



<a name="128373036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128373036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128373036">(Jun 20 2018 at 17:23)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> <span class="user-mention" data-user-id="116009">@nikomatsakis</span> I guess you should update the doc</p>



<a name="128373047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128373047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128373047">(Jun 20 2018 at 17:23)</a>:</h4>
<p>and btw ... it surprised me how fast were merged, what's going on with the queue and the system in general?</p>



<a name="128373048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128373048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128373048">(Jun 20 2018 at 17:23)</a>:</h4>
<p>is it faster for some reason?</p>



<a name="128373409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128373409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128373409">(Jun 20 2018 at 17:31)</a>:</h4>
<p>I think the queue is empty now yeah</p>



<a name="128373465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128373465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128373465">(Jun 20 2018 at 17:32)</a>:</h4>
<p>wonder what's going on :P</p>



<a name="128378206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128378206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128378206">(Jun 20 2018 at 19:13)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> you looking for something else to do? =)</p>



<a name="128378716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128378716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128378716">(Jun 20 2018 at 19:26)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> you gave me this one <a href="https://github.com/rust-lang/rust/issues/51512" target="_blank" title="https://github.com/rust-lang/rust/issues/51512">https://github.com/rust-lang/rust/issues/51512</a></p>



<a name="128378757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128378757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128378757">(Jun 20 2018 at 19:26)</a>:</h4>
<p>but haven't started yet</p>



<a name="128378761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128378761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128378761">(Jun 20 2018 at 19:26)</a>:</h4>
<p>do you want me to do something different?</p>



<a name="128378774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128378774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128378774">(Jun 20 2018 at 19:26)</a>:</h4>
<p>nope</p>



<a name="128378779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128378779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128378779">(Jun 20 2018 at 19:27)</a>:</h4>
<p>I just assigned you</p>



<a name="128378867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128378867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128378867">(Jun 20 2018 at 19:29)</a>:</h4>
<p>ok :)</p>



<a name="128380628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128380628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128380628">(Jun 20 2018 at 20:08)</a>:</h4>
<p>i've been trying hard to continue working on <a href="https://github.com/rust-lang/rust/issues/51027" target="_blank" title="https://github.com/rust-lang/rust/issues/51027">https://github.com/rust-lang/rust/issues/51027</a>, but i fear that there's a lot of things that i need to read up before i can be productive about it</p>



<a name="128380950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128380950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128380950">(Jun 20 2018 at 20:14)</a>:</h4>
<p>might be good to look at lower hanging fruit to start</p>



<a name="128380963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128380963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128380963">(Jun 20 2018 at 20:15)</a>:</h4>
<p>one simple thing to investigate might be <a href="https://github.com/rust-lang/rust/issues/51167" target="_blank" title="https://github.com/rust-lang/rust/issues/51167">https://github.com/rust-lang/rust/issues/51167</a></p>



<a name="128380973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128380973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128380973">(Jun 20 2018 at 20:15)</a>:</h4>
<p>which doesn't <em>super</em> important but might simplify our lives</p>



<a name="128380979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128380979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128380979">(Jun 20 2018 at 20:15)</a>:</h4>
<p>the theory was that we could try just visiting the MIR in "reverse post order" when we issue errors</p>



<a name="128386108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128386108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128386108">(Jun 20 2018 at 21:58)</a>:</h4>
<p>why do we have some error messages duplicated?</p>



<a name="128386149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128386149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128386149">(Jun 20 2018 at 21:58)</a>:</h4>
<p>I see that a lot along some of the things I've been fixing</p>



<a name="128386151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128386151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128386151">(Jun 20 2018 at 21:58)</a>:</h4>
<p>like ...</p>



<a name="128386156"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128386156" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128386156">(Jun 20 2018 at 21:58)</a>:</h4>
<div class="codehilite"><pre><span></span>[santiago@archlinux rust1 (master)]$ rg &quot;move occurs because&quot; src/lib*
src/librustc_borrowck/borrowck/mod.rs
745:                &quot;move occurs because {} has type `{}`, which does not implement the `Copy` trait&quot;,

src/librustc_mir/borrow_check/error_reporting.rs
125:                        &quot;move occurs because {} has type `{}`, \
</pre></div>



<a name="128386163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128386163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128386163">(Jun 20 2018 at 21:58)</a>:</h4>
<p>why is there the same error message twice over those two files?</p>



<a name="128408227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128408227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128408227">(Jun 21 2018 at 09:13)</a>:</h4>
<p>one is the old borrow checker, the other is the new borrow checker</p>



<a name="128414537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128414537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128414537">(Jun 21 2018 at 12:10)</a>:</h4>
<p>ahh ya, facepalm</p>



<a name="128414545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128414545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128414545">(Jun 21 2018 at 12:10)</a>:</h4>
<p>I was confused because I've seen error messages more than twice</p>



<a name="128419681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128419681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128419681">(Jun 21 2018 at 14:12)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> were you seeing ICE failures in <code>E0657.rs</code> and <code>impl_trait_projection.rs</code>?</p>



<a name="128419697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128419697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128419697">(Jun 21 2018 at 14:13)</a>:</h4>
<p>yes</p>



<a name="128419699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128419699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128419699">(Jun 21 2018 at 14:13)</a>:</h4>
<p>I think were those</p>



<a name="128419962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128419962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128419962">(Jun 21 2018 at 14:19)</a>:</h4>
<p>I'm seeing them too. Even on master. Very odd.</p>



<a name="128419964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128419964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128419964">(Jun 21 2018 at 14:19)</a>:</h4>
<p>I have no idea why bors passes</p>



<a name="128422325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128422325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128422325">(Jun 21 2018 at 15:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <a href="https://gist.github.com/spastorino/d0a75bfac0d2c76c9d5b70753cc1911f" target="_blank" title="https://gist.github.com/spastorino/d0a75bfac0d2c76c9d5b70753cc1911f">https://gist.github.com/spastorino/d0a75bfac0d2c76c9d5b70753cc1911f</a></p>



<a name="128423466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128423466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128423466">(Jun 21 2018 at 15:27)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> yep I get the same thing</p>



<a name="128423468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128423468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128423468">(Jun 21 2018 at 15:27)</a>:</h4>
<p>not with nightly it seems</p>



<a name="128423469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128423469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128423469">(Jun 21 2018 at 15:27)</a>:</h4>
<p>but with local builds of master</p>



<a name="128423471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128423471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128423471">(Jun 21 2018 at 15:27)</a>:</h4>
<p>I am investigating</p>



<a name="128423511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128423511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128423511">(Jun 21 2018 at 15:28)</a>:</h4>
<p>actually wait</p>



<a name="128423512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/128423512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#128423512">(Jun 21 2018 at 15:28)</a>:</h4>
<p>I <em>do</em> get it with nightly</p>



<a name="130273213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/130273213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#130273213">(Jul 25 2018 at 12:49)</a>:</h4>
<p>Okay, here is a perhaps silly question. When you see diagnostic output like this:  <a href="https://github.com/rust-lang/rust/blob/fefe81605d6111faa8dbb3635ab2c51d59de740a/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.nll.stderr#L8" target="_blank" title="https://github.com/rust-lang/rust/blob/fefe81605d6111faa8dbb3635ab2c51d59de740a/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.nll.stderr#L8">borrowck-move-out-of-vec-tail.nll.stderr</a> ...</p>



<a name="130273227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/130273227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#130273227">(Jul 25 2018 at 12:49)</a>:</h4>
<p>Which I'll paste inline for ease of reference:</p>



<a name="130273229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/130273229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#130273229">(Jul 25 2018 at 12:49)</a>:</h4>
<div class="codehilite"><pre><span></span>help: to prevent move, use ref or ref mut
   |
LL |                 &amp;[Foo { string: ref a },
   |                                 ^^^^^
help: to prevent move, use ref or ref mut
   |
LL |                   Foo { string: ref b }] =&gt; {
   |                                 ^^^^^
</pre></div>



<a name="130273298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/130273298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#130273298">(Jul 25 2018 at 12:50)</a>:</h4>
<p>Do you read those lines that are highlighted as saying "here I have <em>literally</em> transcribed your original source code that you need to edit in some manner"</p>



<a name="130273315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/130273315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#130273315">(Jul 25 2018 at 12:51)</a>:</h4>
<p>or do you read them as saying "I am highlighting code that does not actually exist in your files. It rather is the <em>hypothetical</em> code that I am suggesting you put in there instead."</p>



<a name="130273332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/130273332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#130273332">(Jul 25 2018 at 12:51)</a>:</h4>
<p>Because as I understand it, our current diagnostics (at least from these NLL cases) are meant to be interpreted as the latter.</p>
<ul>
<li>(But my own personal reading is the former. I have done several double-takes trying to understand the compiler output in these cases.)</li>
</ul>



<a name="130273388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/130273388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#130273388">(Jul 25 2018 at 12:52)</a>:</h4>
<p>... I don't know if I've seen us do highlighting like this in other cases outside of NLL. Is there precedent?</p>



<a name="130273406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/130273406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#130273406">(Jul 25 2018 at 12:52)</a>:</h4>
<p>(if there is precedent then I'll just accept this as current practice in our diagnostic system.)</p>



<a name="130274606"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/130274606" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#130274606">(Jul 25 2018 at 13:16)</a>:</h4>
<p>it depends but I also find that kind of confusing</p>



<a name="130274611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/diagnostics/near/130274611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/diagnostics.html#130274611">(Jul 25 2018 at 13:16)</a>:</h4>
<p>I feel like wording like "to prevent move, use ref or ref mut, as shown here:" would help</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>